From 174d9f9a3399567c85cfeeed4e0e3c28188d23eb Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 21 Jan 2026 00:52:15 +0000 Subject: [PATCH 01/16] Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2025-11-01, SDK Release Type: stable, and CommitSHA: 'eb320d1d85f5b46c3cfe6cf60a1f0de4ef3b01d9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5777146 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 1 + .../CHANGELOG.md | 8 + .../README.md | 102 + .../SAMPLE.md | 1838 ++++++++++++++ .../pom.xml | 73 + .../generated/ContainerRegistryManager.java | 429 ++++ .../generated/fluent/CacheRulesClient.java | 268 ++ .../fluent/ConnectedRegistriesClient.java | 338 +++ .../ContainerRegistryManagementClient.java | 118 + .../fluent/CredentialSetsClient.java | 275 +++ .../generated/fluent/OperationsClient.java | 40 + .../PrivateEndpointConnectionsClient.java | 209 ++ .../generated/fluent/RegistriesClient.java | 577 +++++ .../generated/fluent/ReplicationsClient.java | 270 ++ .../generated/fluent/ScopeMapsClient.java | 268 ++ .../generated/fluent/TokensClient.java | 268 ++ .../generated/fluent/WebhooksClient.java | 362 +++ .../fluent/models/CacheRuleInner.java | 155 ++ .../models/CacheRuleUpdateProperties.java | 87 + .../fluent/models/CallbackConfigInner.java | 94 + .../fluent/models/ConnectedRegistryInner.java | 155 ++ .../ConnectedRegistryUpdateProperties.java | 212 ++ .../fluent/models/CredentialSetInner.java | 184 ++ .../models/CredentialSetUpdateProperties.java | 94 + .../fluent/models/EventInfoInner.java | 85 + .../generated/fluent/models/EventInner.java | 110 + .../GenerateCredentialsResultInner.java | 95 + .../models/OperationDefinitionInner.java | 158 ++ .../models/OperationPropertiesDefinition.java | 77 + .../PrivateEndpointConnectionInner.java | 157 ++ .../models/PrivateLinkResourceInner.java | 144 ++ .../fluent/models/RegistryInner.java | 239 ++ .../RegistryListCredentialsResultInner.java | 95 + .../models/RegistryNameStatusInner.java | 109 + .../RegistryPropertiesUpdateParameters.java | 360 +++ .../models/RegistryUsageListResultInner.java | 77 + .../fluent/models/ReplicationInner.java | 181 ++ ...ReplicationUpdateParametersProperties.java | 93 + .../fluent/models/ScopeMapInner.java | 155 ++ .../ScopeMapPropertiesUpdateParameters.java | 122 + .../generated/fluent/models/TokenInner.java | 155 ++ .../fluent/models/TokenUpdateProperties.java | 143 ++ .../generated/fluent/models/WebhookInner.java | 152 ++ .../WebhookPropertiesCreateParameters.java | 213 ++ .../WebhookPropertiesUpdateParameters.java | 212 ++ .../generated/fluent/models/package-info.java | 11 + .../generated/fluent/package-info.java | 11 + .../implementation/CacheRuleImpl.java | 139 ++ .../implementation/CacheRulesClientImpl.java | 980 ++++++++ .../implementation/CacheRulesImpl.java | 156 ++ .../implementation/CallbackConfigImpl.java | 43 + .../ConnectedRegistriesClientImpl.java | 1248 ++++++++++ .../ConnectedRegistriesImpl.java | 167 ++ .../implementation/ConnectedRegistryImpl.java | 175 ++ ...tainerRegistryManagementClientBuilder.java | 138 ++ ...ContainerRegistryManagementClientImpl.java | 432 ++++ .../implementation/CredentialSetImpl.java | 161 ++ .../CredentialSetsClientImpl.java | 1005 ++++++++ .../implementation/CredentialSetsImpl.java | 156 ++ .../generated/implementation/EventImpl.java | 42 + .../implementation/EventInfoImpl.java | 32 + .../GenerateCredentialsResultImpl.java | 44 + .../OperationDefinitionImpl.java | 50 + .../implementation/OperationsClientImpl.java | 213 ++ .../implementation/OperationsImpl.java | 45 + .../PrivateEndpointConnectionImpl.java | 134 + .../PrivateEndpointConnectionsClientImpl.java | 793 ++++++ .../PrivateEndpointConnectionsImpl.java | 167 ++ .../PrivateLinkResourceImpl.java | 50 + .../implementation/RegistriesClientImpl.java | 2200 +++++++++++++++++ .../implementation/RegistriesImpl.java | 313 +++ .../implementation/RegistryImpl.java | 309 +++ .../RegistryListCredentialsResultImpl.java | 44 + .../RegistryNameStatusImpl.java | 40 + .../RegistryUsageListResultImpl.java | 40 + .../implementation/ReplicationImpl.java | 187 ++ .../ReplicationsClientImpl.java | 987 ++++++++ .../implementation/ReplicationsImpl.java | 156 ++ .../implementation/ResourceManagerUtils.java | 195 ++ .../implementation/ScopeMapImpl.java | 145 ++ .../implementation/ScopeMapsClientImpl.java | 976 ++++++++ .../implementation/ScopeMapsImpl.java | 156 ++ .../generated/implementation/TokenImpl.java | 151 ++ .../implementation/TokensClientImpl.java | 972 ++++++++ .../generated/implementation/TokensImpl.java | 156 ++ .../generated/implementation/WebhookImpl.java | 263 ++ .../implementation/WebhooksClientImpl.java | 1363 ++++++++++ .../implementation/WebhooksImpl.java | 217 ++ .../models/CacheRulesListResult.java | 96 + .../models/ConnectedRegistryListResult.java | 97 + .../models/CredentialSetListResult.java | 96 + .../models/EventListResult.java | 96 + .../models/OperationListResult.java | 97 + .../PrivateEndpointConnectionListResult.java | 99 + .../models/PrivateLinkResourceListResult.java | 98 + .../models/RegistryListResult.java | 96 + .../models/ReplicationListResult.java | 96 + .../models/ScopeMapListResult.java | 96 + .../models/TokenListResult.java | 96 + .../models/WebhookListResult.java | 96 + .../implementation/package-info.java | 11 + .../generated/models/Action.java | 46 + .../generated/models/ActionsRequired.java | 51 + .../models/ActivationProperties.java | 73 + .../generated/models/ActivationStatus.java | 51 + .../generated/models/Actor.java | 74 + .../generated/models/AuditLogStatus.java | 51 + .../generated/models/AuthCredential.java | 157 ++ .../AzureADAuthenticationAsArmPolicy.java | 87 + ...zureADAuthenticationAsArmPolicyStatus.java | 52 + .../generated/models/CacheRule.java | 191 ++ .../generated/models/CacheRuleProperties.java | 182 ++ .../models/CacheRuleUpdateParameters.java | 100 + .../generated/models/CacheRules.java | 146 ++ .../generated/models/CallbackConfig.java | 34 + .../generated/models/CertificateType.java | 46 + .../generated/models/ConnectedRegistries.java | 175 ++ .../generated/models/ConnectedRegistry.java | 264 ++ .../models/ConnectedRegistryMode.java | 61 + .../models/ConnectedRegistryProperties.java | 369 +++ .../ConnectedRegistryUpdateParameters.java | 197 ++ .../generated/models/ConnectionState.java | 61 + .../generated/models/ConnectionStatus.java | 61 + .../models/ContainerRegistryResourceType.java | 51 + .../generated/models/CredentialHealth.java | 108 + .../models/CredentialHealthStatus.java | 51 + .../generated/models/CredentialName.java | 46 + .../generated/models/CredentialSet.java | 227 ++ .../models/CredentialSetProperties.java | 156 ++ .../models/CredentialSetUpdateParameters.java | 131 + .../generated/models/CredentialSets.java | 146 ++ .../generated/models/DefaultAction.java | 51 + .../generated/models/EncryptionProperty.java | 113 + .../generated/models/EncryptionStatus.java | 51 + .../generated/models/Event.java | 40 + .../generated/models/EventContent.java | 185 ++ .../generated/models/EventInfo.java | 26 + .../generated/models/EventRequestMessage.java | 144 ++ .../models/EventResponseMessage.java | 144 ++ .../generated/models/ExportPolicy.java | 85 + .../generated/models/ExportPolicyStatus.java | 51 + .../models/GarbageCollectionProperties.java | 115 + .../models/GenerateCredentialsParameters.java | 149 ++ .../models/GenerateCredentialsResult.java | 35 + .../generated/models/IPRule.java | 114 + .../generated/models/IdentityProperties.java | 160 ++ .../models/ImportImageParameters.java | 182 ++ .../generated/models/ImportMode.java | 52 + .../generated/models/ImportSource.java | 179 ++ .../models/ImportSourceCredentials.java | 114 + .../generated/models/KeyVaultProperties.java | 165 ++ .../generated/models/LogLevel.java | 66 + .../generated/models/LoggingProperties.java | 114 + .../models/LoginServerProperties.java | 89 + .../models/NetworkRuleBypassOptions.java | 51 + .../generated/models/NetworkRuleSet.java | 116 + .../generated/models/OperationDefinition.java | 57 + .../models/OperationDisplayDefinition.java | 125 + .../OperationLogSpecificationDefinition.java | 110 + ...perationMetricSpecificationDefinition.java | 161 ++ ...erationServiceSpecificationDefinition.java | 100 + .../generated/models/Operations.java | 35 + .../generated/models/ParentProperties.java | 114 + .../generated/models/PasswordName.java | 56 + .../generated/models/Policies.java | 201 ++ .../generated/models/PolicyStatus.java | 51 + .../generated/models/PrivateEndpoint.java | 85 + .../models/PrivateEndpointConnection.java | 190 ++ .../PrivateEndpointConnectionProperties.java | 136 + .../models/PrivateEndpointConnections.java | 149 ++ .../generated/models/PrivateLinkResource.java | 56 + .../models/PrivateLinkResourceProperties.java | 111 + .../PrivateLinkServiceConnectionState.java | 150 ++ .../generated/models/ProvisioningState.java | 71 + .../generated/models/PublicNetworkAccess.java | 51 + .../generated/models/QuarantinePolicy.java | 85 + .../RegenerateCredentialParameters.java | 87 + .../generated/models/Registries.java | 377 +++ .../generated/models/Registry.java | 550 +++++ .../models/RegistryListCredentialsResult.java | 35 + .../models/RegistryNameCheckRequest.java | 117 + .../generated/models/RegistryNameStatus.java | 42 + .../generated/models/RegistryPassword.java | 91 + .../generated/models/RegistryProperties.java | 482 ++++ .../models/RegistryUpdateParameters.java | 396 +++ .../generated/models/RegistryUsage.java | 125 + .../models/RegistryUsageListResult.java | 28 + .../generated/models/RegistryUsageUnit.java | 51 + .../generated/models/Replication.java | 270 ++ .../models/ReplicationProperties.java | 156 ++ .../models/ReplicationUpdateParameters.java | 133 + .../generated/models/Replications.java | 146 ++ .../generated/models/Request.java | 146 ++ .../models/ResourceIdentityType.java | 66 + .../generated/models/RetentionPolicy.java | 132 + .../generated/models/RoleAssignmentMode.java | 51 + .../generated/models/ScopeMap.java | 207 ++ .../generated/models/ScopeMapProperties.java | 173 ++ .../models/ScopeMapUpdateParameters.java | 127 + .../generated/models/ScopeMaps.java | 146 ++ .../generated/models/Sku.java | 102 + .../generated/models/SkuName.java | 61 + .../generated/models/SkuTier.java | 61 + .../generated/models/Source.java | 94 + .../generated/models/Status.java | 108 + .../models/StatusDetailProperties.java | 140 ++ .../generated/models/SyncProperties.java | 219 ++ .../models/SyncUpdateProperties.java | 153 ++ .../generated/models/Target.java | 210 ++ .../models/TlsCertificateProperties.java | 89 + .../generated/models/TlsProperties.java | 89 + .../generated/models/TlsStatus.java | 51 + .../generated/models/Token.java | 216 ++ .../generated/models/TokenCertificate.java | 176 ++ .../models/TokenCertificateName.java | 51 + .../models/TokenCredentialsProperties.java | 117 + .../generated/models/TokenPassword.java | 164 ++ .../generated/models/TokenPasswordName.java | 51 + .../generated/models/TokenProperties.java | 176 ++ .../generated/models/TokenStatus.java | 51 + .../models/TokenUpdateParameters.java | 144 ++ .../generated/models/Tokens.java | 145 ++ .../generated/models/TrustPolicy.java | 113 + .../generated/models/TrustPolicyType.java | 46 + .../models/UserIdentityProperties.java | 89 + .../generated/models/Webhook.java | 444 ++++ .../generated/models/WebhookAction.java | 66 + .../models/WebhookCreateParameters.java | 255 ++ .../generated/models/WebhookProperties.java | 133 + .../generated/models/WebhookStatus.java | 51 + .../models/WebhookUpdateParameters.java | 226 ++ .../generated/models/Webhooks.java | 229 ++ .../generated/models/ZoneRedundancy.java | 51 + .../generated/models/package-info.java | 11 + .../generated/package-info.java | 11 + .../src/main/java/module-info.java | 16 + ...registry-generated_apiview_properties.json | 264 ++ ...-containerregistry-generated_metadata.json | 1 + .../proxy-config.json | 1 + .../reflect-config.json | 1 + ...ger-containerregistry-generated.properties | 1 + .../generated/CacheRulesCreateSamples.java | 31 + .../generated/CacheRulesDeleteSamples.java | 23 + .../generated/CacheRulesGetSamples.java | 24 + .../generated/CacheRulesListSamples.java | 23 + .../generated/CacheRulesUpdateSamples.java | 31 + .../ConnectedRegistriesCreateSamples.java | 44 + .../ConnectedRegistriesDeactivateSamples.java | 24 + .../ConnectedRegistriesDeleteSamples.java | 24 + .../ConnectedRegistriesGetSamples.java | 24 + .../ConnectedRegistriesListSamples.java | 23 + .../ConnectedRegistriesUpdateSamples.java | 46 + .../CredentialSetsCreateSamples.java | 38 + .../CredentialSetsDeleteSamples.java | 24 + .../generated/CredentialSetsGetSamples.java | 24 + .../generated/CredentialSetsListSamples.java | 23 + .../CredentialSetsUpdateSamples.java | 35 + .../generated/OperationsListSamples.java | 23 + ...pointConnectionsCreateOrUpdateSamples.java | 33 + ...ivateEndpointConnectionsDeleteSamples.java | 24 + .../PrivateEndpointConnectionsGetSamples.java | 24 + ...PrivateEndpointConnectionsListSamples.java | 23 + ...egistriesCheckNameAvailabilitySamples.java | 47 + .../generated/RegistriesCreateSamples.java | 91 + .../generated/RegistriesDeleteSamples.java | 23 + .../RegistriesGenerateCredentialsSamples.java | 30 + .../RegistriesGetByResourceGroupSamples.java | 24 + ...gistriesGetPrivateLinkResourceSamples.java | 25 + .../RegistriesImportImageSamples.java | 79 + .../RegistriesListByResourceGroupSamples.java | 23 + .../RegistriesListCredentialsSamples.java | 24 + ...striesListPrivateLinkResourcesSamples.java | 24 + .../generated/RegistriesListSamples.java | 23 + .../RegistriesListUsagesSamples.java | 23 + ...RegistriesRegenerateCredentialSamples.java | 28 + .../generated/RegistriesUpdateSamples.java | 50 + .../generated/ReplicationsCreateSamples.java | 65 + .../generated/ReplicationsDeleteSamples.java | 24 + .../generated/ReplicationsGetSamples.java | 24 + .../generated/ReplicationsListSamples.java | 23 + .../generated/ReplicationsUpdateSamples.java | 42 + .../generated/ScopeMapsCreateSamples.java | 32 + .../generated/ScopeMapsDeleteSamples.java | 23 + .../generated/ScopeMapsGetSamples.java | 24 + .../generated/ScopeMapsListSamples.java | 23 + .../generated/ScopeMapsUpdateSamples.java | 33 + .../generated/TokensCreateSamples.java | 39 + .../generated/TokensDeleteSamples.java | 23 + .../generated/generated/TokensGetSamples.java | 23 + .../generated/TokensListSamples.java | 23 + .../generated/TokensUpdateSamples.java | 38 + .../generated/WebhooksCreateSamples.java | 51 + .../generated/WebhooksDeleteSamples.java | 23 + .../WebhooksGetCallbackConfigSamples.java | 25 + .../generated/WebhooksGetSamples.java | 24 + .../generated/WebhooksListEventsSamples.java | 23 + .../generated/WebhooksListSamples.java | 23 + .../generated/WebhooksPingSamples.java | 24 + .../generated/WebhooksUpdateSamples.java | 52 + .../generated/ActivationPropertiesTests.java | 16 + .../generated/generated/ActorTests.java | 17 + ...AzureADAuthenticationAsArmPolicyTests.java | 27 + .../generated/CallbackConfigInnerTests.java | 20 + ...onnectedRegistriesDeactivateMockTests.java | 34 + .../ConnectedRegistriesDeleteMockTests.java | 33 + .../generated/EventContentTests.java | 39 + .../generated/EventInfoInnerTests.java | 17 + .../generated/EventRequestMessageTests.java | 43 + .../generated/ExportPolicyTests.java | 25 + .../GarbageCollectionPropertiesTests.java | 28 + .../generated/generated/IPRuleTests.java | 27 + .../generated/IdentityPropertiesTests.java | 44 + .../generated/LoggingPropertiesTests.java | 30 + .../generated/LoginServerPropertiesTests.java | 23 + .../generated/NetworkRuleSetTests.java | 35 + .../OperationDefinitionInnerTests.java | 36 + .../OperationDisplayDefinitionTests.java | 22 + .../generated/OperationListResultTests.java | 26 + ...rationLogSpecificationDefinitionTests.java | 21 + ...ionMetricSpecificationDefinitionTests.java | 24 + .../OperationPropertiesDefinitionTests.java | 30 + ...onServiceSpecificationDefinitionTests.java | 27 + .../generated/OperationsListMockTests.java | 62 + .../generated/generated/PoliciesTests.java | 54 + .../PrivateEndpointConnectionInnerTests.java | 46 + ...vateEndpointConnectionListResultTests.java | 28 + ...vateEndpointConnectionPropertiesTests.java | 41 + ...intConnectionsCreateOrUpdateMockTests.java | 57 + ...ateEndpointConnectionsDeleteMockTests.java | 34 + ...ntConnectionsGetWithResponseMockTests.java | 47 + ...ivateEndpointConnectionsListMockTests.java | 47 + .../generated/PrivateEndpointTests.java | 24 + .../PrivateLinkResourceInnerTests.java | 19 + .../PrivateLinkResourceListResultTests.java | 20 + .../PrivateLinkResourcePropertiesTests.java | 19 + ...rivateLinkServiceConnectionStateTests.java | 35 + .../generated/QuarantinePolicyTests.java | 25 + .../RegenerateCredentialParametersTests.java | 26 + ...NameAvailabilityWithResponseMockTests.java | 45 + .../generated/RegistriesDeleteMockTests.java | 33 + ...vateLinkResourceWithResponseMockTests.java | 39 + ...riesListPrivateLinkResourcesMockTests.java | 39 + ...striesListUsagesWithResponseMockTests.java | 43 + .../RegistryNameCheckRequestTests.java | 30 + .../RegistryNameStatusInnerTests.java | 21 + .../generated/RegistryPasswordTests.java | 20 + .../RegistryUsageListResultInnerTests.java | 23 + .../generated/RegistryUsageTests.java | 23 + .../generated/ReplicationInnerTests.java | 51 + .../generated/ReplicationListResultTests.java | 24 + .../generated/ReplicationPropertiesTests.java | 30 + ...cationUpdateParametersPropertiesTests.java | 26 + .../ReplicationUpdateParametersTests.java | 43 + .../ReplicationsCreateMockTests.java | 63 + .../ReplicationsDeleteMockTests.java | 34 + .../ReplicationsGetWithResponseMockTests.java | 43 + .../generated/ReplicationsListMockTests.java | 43 + .../generated/generated/RequestTests.java | 23 + .../generated/RetentionPolicyTests.java | 29 + .../generated/ScopeMapInnerTests.java | 31 + .../generated/ScopeMapListResultTests.java | 21 + .../generated/ScopeMapPropertiesTests.java | 30 + ...opeMapPropertiesUpdateParametersTests.java | 30 + .../ScopeMapUpdateParametersTests.java | 30 + .../generated/ScopeMapsCreateMockTests.java | 45 + .../generated/ScopeMapsDeleteMockTests.java | 33 + .../ScopeMapsGetWithResponseMockTests.java | 40 + .../generated/ScopeMapsListMockTests.java | 40 + .../generated/generated/SkuTests.java | 25 + .../generated/generated/SourceTests.java | 19 + .../generated/generated/StatusTests.java | 17 + .../generated/SyncUpdatePropertiesTests.java | 34 + .../generated/generated/TargetTests.java | 27 + .../TlsCertificatePropertiesTests.java | 16 + .../generated/TlsPropertiesTests.java | 18 + .../generated/TokenPasswordTests.java | 34 + .../generated/TokensDeleteMockTests.java | 33 + .../generated/generated/TrustPolicyTests.java | 29 + .../UserIdentityPropertiesTests.java | 23 + .../WebhookCreateParametersTests.java | 63 + .../generated/WebhookInnerTests.java | 25 + .../generated/WebhookListResultTests.java | 26 + ...ebhookPropertiesCreateParametersTests.java | 55 + .../generated/WebhookPropertiesTests.java | 23 + ...ebhookPropertiesUpdateParametersTests.java | 55 + .../WebhookUpdateParametersTests.java | 58 + .../generated/WebhooksCreateMockTests.java | 70 + .../generated/WebhooksDeleteMockTests.java | 33 + ...etCallbackConfigWithResponseMockTests.java | 41 + .../WebhooksGetWithResponseMockTests.java | 44 + .../generated/WebhooksListMockTests.java | 45 + .../WebhooksPingWithResponseMockTests.java | 38 + .../tsp-location.yaml | 4 + .../CHANGELOG.md | 2 +- .../README.md | 2 +- sdk/containerregistry/ci.yml | 33 +- sdk/containerregistry/pom.xml | 1 + 397 files changed, 47867 insertions(+), 15 deletions(-) create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 73d4dac8e44f..94eacd21d952 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -515,6 +515,7 @@ com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerregistry-generated;1.0.0;1.0.0 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 com.azure.v2:azure-client-sdk-parent;2.0.0-beta.2;2.0.0-beta.2 diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md new file mode 100644 index 000000000000..1f44a0e958fa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md @@ -0,0 +1,8 @@ +# Release History + +## 1.0.0 (2026-01-21) + +- Azure Resource Manager ContainerRegistry client library for Java. This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +### Features Added + +- Initial release for the azure-resourcemanager-containerregistry-generated Java SDK. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md new file mode 100644 index 000000000000..a21bb7372e7c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md @@ -0,0 +1,102 @@ +# Azure Resource Manager ContainerRegistry client library for Java + +Azure Resource Manager ContainerRegistry client library for Java. + +This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-containerregistry-generated;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-containerregistry-generated + 1.0.0 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. + +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +ContainerRegistryManager manager = ContainerRegistryManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md new file mode 100644 index 000000000000..de89995aca75 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md @@ -0,0 +1,1838 @@ +# Code snippets and samples + + +## CacheRules + +- [Create](#cacherules_create) +- [Delete](#cacherules_delete) +- [Get](#cacherules_get) +- [List](#cacherules_list) +- [Update](#cacherules_update) + +## ConnectedRegistries + +- [Create](#connectedregistries_create) +- [Deactivate](#connectedregistries_deactivate) +- [Delete](#connectedregistries_delete) +- [Get](#connectedregistries_get) +- [List](#connectedregistries_list) +- [Update](#connectedregistries_update) + +## CredentialSets + +- [Create](#credentialsets_create) +- [Delete](#credentialsets_delete) +- [Get](#credentialsets_get) +- [List](#credentialsets_list) +- [Update](#credentialsets_update) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [CreateOrUpdate](#privateendpointconnections_createorupdate) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) + +## Registries + +- [CheckNameAvailability](#registries_checknameavailability) +- [Create](#registries_create) +- [Delete](#registries_delete) +- [GenerateCredentials](#registries_generatecredentials) +- [GetByResourceGroup](#registries_getbyresourcegroup) +- [GetPrivateLinkResource](#registries_getprivatelinkresource) +- [ImportImage](#registries_importimage) +- [List](#registries_list) +- [ListByResourceGroup](#registries_listbyresourcegroup) +- [ListCredentials](#registries_listcredentials) +- [ListPrivateLinkResources](#registries_listprivatelinkresources) +- [ListUsages](#registries_listusages) +- [RegenerateCredential](#registries_regeneratecredential) +- [Update](#registries_update) + +## Replications + +- [Create](#replications_create) +- [Delete](#replications_delete) +- [Get](#replications_get) +- [List](#replications_list) +- [Update](#replications_update) + +## ScopeMaps + +- [Create](#scopemaps_create) +- [Delete](#scopemaps_delete) +- [Get](#scopemaps_get) +- [List](#scopemaps_list) +- [Update](#scopemaps_update) + +## Tokens + +- [Create](#tokens_create) +- [Delete](#tokens_delete) +- [Get](#tokens_get) +- [List](#tokens_list) +- [Update](#tokens_update) + +## Webhooks + +- [Create](#webhooks_create) +- [Delete](#webhooks_delete) +- [Get](#webhooks_get) +- [GetCallbackConfig](#webhooks_getcallbackconfig) +- [List](#webhooks_list) +- [ListEvents](#webhooks_listevents) +- [Ping](#webhooks_ping) +- [Update](#webhooks_update) +### CacheRules_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; + +/** + * Samples for CacheRules Create. + */ +public final class CacheRulesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleCreate.json + */ + /** + * Sample code: CacheRuleCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules() + .define("myCacheRule") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new CacheRuleProperties().withCredentialSetResourceId("fakeTokenPlaceholder") + .withSourceRepository("docker.io/library/hello-world") + .withTargetRepository("cached-docker-hub/hello-world")) + .create(); + } +} +``` + +### CacheRules_Delete + +```java +/** + * Samples for CacheRules Delete. + */ +public final class CacheRulesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleDelete.json + */ + /** + * Sample code: CacheRuleDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules().delete("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} +``` + +### CacheRules_Get + +```java +/** + * Samples for CacheRules Get. + */ +public final class CacheRulesGetSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleGet.json + */ + /** + * Sample code: CacheRuleGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules() + .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} +``` + +### CacheRules_List + +```java +/** + * Samples for CacheRules List. + */ +public final class CacheRulesListSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleList.json + */ + /** + * Sample code: CacheRuleList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### CacheRules_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; + +/** + * Samples for CacheRules Update. + */ +public final class CacheRulesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json + */ + /** + * Sample code: CacheRuleUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + CacheRule resource = manager.cacheRules() + .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withCredentialSetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2") + .apply(); + } +} +``` + +### ConnectedRegistries_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ParentProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncProperties; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for ConnectedRegistries Create. + */ +public final class ConnectedRegistriesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json + */ + /** + * Sample code: ConnectedRegistryCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryCreate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .define("myConnectedRegistry") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new ConnectedRegistryProperties().withMode(ConnectedRegistryMode.READ_WRITE) + .withParent( + new ParentProperties().withSyncProperties(new SyncProperties().withTokenId("fakeTokenPlaceholder") + .withSchedule("0 9 * * *") + .withSyncWindow(Duration.parse("PT3H")) + .withMessageTtl(Duration.parse("P2D")))) + .withClientTokenIds(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token")) + .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) + .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *"))) + .create(); + } +} +``` + +### ConnectedRegistries_Deactivate + +```java +/** + * Samples for ConnectedRegistries Deactivate. + */ +public final class ConnectedRegistriesDeactivateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json + */ + /** + * Sample code: ConnectedRegistryDeactivate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryDeactivate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .deactivate("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedRegistries_Delete + +```java +/** + * Samples for ConnectedRegistries Delete. + */ +public final class ConnectedRegistriesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json + */ + /** + * Sample code: ConnectedRegistryDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryDelete( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .delete("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedRegistries_Get + +```java +/** + * Samples for ConnectedRegistries Get. + */ +public final class ConnectedRegistriesGetSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json + */ + /** + * Sample code: ConnectedRegistryGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + connectedRegistryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .getWithResponse("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedRegistries_List + +```java +/** + * Samples for ConnectedRegistries List. + */ +public final class ConnectedRegistriesListSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json + */ + /** + * Sample code: ConnectedRegistryList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + connectedRegistryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries().list("myResourceGroup", "myRegistry", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedRegistries_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; +import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for ConnectedRegistries Update. + */ +public final class ConnectedRegistriesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json + */ + /** + * Sample code: ConnectedRegistryUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryUpdate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + ConnectedRegistry resource = manager.connectedRegistries() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSyncProperties(new SyncUpdateProperties().withSchedule("0 0 */10 * *") + .withSyncWindow(Duration.parse("P2D")) + .withMessageTtl(Duration.parse("P30D"))) + .withLogging( + new LoggingProperties().withLogLevel(LogLevel.DEBUG).withAuditLogStatus(AuditLogStatus.ENABLED)) + .withClientTokenIds(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token")) + .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) + .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *")) + .apply(); + } +} +``` + +### CredentialSets_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; +import java.util.Arrays; + +/** + * Samples for CredentialSets Create. + */ +public final class CredentialSetsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetCreate.json + */ + /** + * Sample code: CredentialSetCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .define("myCredentialSet") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new CredentialSetProperties().withLoginServer("docker.io") + .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder")))) + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} +``` + +### CredentialSets_Delete + +```java +/** + * Samples for CredentialSets Delete. + */ +public final class CredentialSetsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetDelete.json + */ + /** + * Sample code: CredentialSetDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .delete("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} +``` + +### CredentialSets_Get + +```java +/** + * Samples for CredentialSets Get. + */ +public final class CredentialSetsGetSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetGet.json + */ + /** + * Sample code: CredentialSetGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} +``` + +### CredentialSets_List + +```java +/** + * Samples for CredentialSets List. + */ +public final class CredentialSetsListSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetList.json + */ + /** + * Sample code: CredentialSetList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### CredentialSets_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; +import java.util.Arrays; + +/** + * Samples for CredentialSets Update. + */ +public final class CredentialSetsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json + */ + /** + * Sample code: CredentialSetUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + CredentialSet resource = manager.credentialSets() + .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder"))) + .apply(); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2025-11-01/OperationList.json + */ + /** + * Sample code: OperationList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + operationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json + */ + /** + * Sample code: PrivateEndpointConnectionCreateOrUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionCreateOrUpdate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .define("myConnection") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("Auto-Approved"))) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json + */ + /** + * Sample code: PrivateEndpointConnectionDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionDelete( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .delete("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json + */ + /** + * Sample code: PrivateEndpointConnectionGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionGet( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json + */ + /** + * Sample code: PrivateEndpointConnectionList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionList( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_CheckNameAvailability + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; + +/** + * Samples for Registries CheckNameAvailability. + */ +public final class RegistriesCheckNameAvailabilitySamples { + /* + * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json + */ + /** + * Sample code: RegistryCheckNameAvailable. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCheckNameAvailable( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json + */ + /** + * Sample code: RegistryCheckNameNotAvailable. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCheckNameNotAvailable( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import com.azure.resourcemanager.containerregistry.generated.models.SkuName; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Registries Create. + */ +public final class RegistriesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json + */ + /** + * Sample code: RegistryCreateAbac. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryCreateAbac(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties( + new RegistryProperties().withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS)) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json + */ + /** + * Sample code: RegistryCreateZoneRedundant. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCreateZoneRedundant( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new RegistryProperties().withZoneRedundancy(ZoneRedundancy.ENABLED)) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCreate.json + */ + /** + * Sample code: RegistryCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new RegistryProperties().withAdminUserEnabled(true)) + .create(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### Registries_Delete + +```java +/** + * Samples for Registries Delete. + */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryDelete.json + */ + /** + * Sample code: RegistryDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().delete("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_GenerateCredentials + +```java +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import java.time.OffsetDateTime; + +/** + * Samples for Registries GenerateCredentials. + */ +public final class RegistriesGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json + */ + /** + * Sample code: RegistryGenerateCredentials. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryGenerateCredentials( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .generateCredentials("myResourceGroup", "myRegistry", + new GenerateCredentialsParameters().withTokenId("fakeTokenPlaceholder") + .withExpiry(OffsetDateTime.parse("2020-12-31T15:59:59.0707808Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_GetByResourceGroup + +```java +/** + * Samples for Registries GetByResourceGroup. + */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGet.json + */ + /** + * Sample code: RegistryGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_GetPrivateLinkResource + +```java +/** + * Samples for Registries GetPrivateLinkResource. + */ +public final class RegistriesGetPrivateLinkResourceSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json + */ + /** + * Sample code: RegistryGetPrivateLinkResource. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryGetPrivateLinkResource( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .getPrivateLinkResourceWithResponse("myResourceGroup", "myRegistry", "registry", + com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ImportImage + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.ImportMode; +import com.azure.resourcemanager.containerregistry.generated.models.ImportSource; +import java.util.Arrays; + +/** + * Samples for Registries ImportImage. + */ +public final class RegistriesImportImageSamples { + /* + * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json + */ + /** + * Sample code: ImportImageFromPublicRegistry. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void importImageFromPublicRegistry( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters() + .withSource(new ImportSource().withRegistryUri("registry.hub.docker.com") + .withSourceImage("library/hello-world")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/ImportImageByTag.json + */ + /** + * Sample code: ImportImageByTag. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + importImageByTag(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters().withSource(new ImportSource().withResourceId( + "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") + .withSourceImage("sourceRepository:sourceTag")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json + */ + /** + * Sample code: ImportImageByManifestDigest. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void importImageByManifestDigest( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters().withSource(new ImportSource().withResourceId( + "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") + .withSourceImage( + "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_List + +```java +/** + * Samples for Registries List. + */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryList.json + */ + /** + * Sample code: RegistryList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ListByResourceGroup + +```java +/** + * Samples for Registries ListByResourceGroup. + */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json + */ + /** + * Sample code: RegistryListByResourceGroup. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListByResourceGroup( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ListCredentials + +```java +/** + * Samples for Registries ListCredentials. + */ +public final class RegistriesListCredentialsSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListCredentials.json + */ + /** + * Sample code: RegistryListCredentials. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListCredentials( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .listCredentialsWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ListPrivateLinkResources + +```java +/** + * Samples for Registries ListPrivateLinkResources. + */ +public final class RegistriesListPrivateLinkResourcesSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json + */ + /** + * Sample code: RegistryListPrivateLinkResources. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListPrivateLinkResources( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .listPrivateLinkResources("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ListUsages + +```java +/** + * Samples for Registries ListUsages. + */ +public final class RegistriesListUsagesSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListUsages.json + */ + /** + * Sample code: RegistryListUsages. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryListUsages(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().listUsagesWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_RegenerateCredential + +```java +import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; + +/** + * Samples for Registries RegenerateCredential. + */ +public final class RegistriesRegenerateCredentialSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json + */ + /** + * Sample code: RegistryRegenerateCredential. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryRegenerateCredential( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .regenerateCredentialWithResponse("myResourceGroup", "myRegistry", + new RegenerateCredentialParameters().withName(PasswordName.PASSWORD), com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.Registry; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import com.azure.resourcemanager.containerregistry.generated.models.SkuName; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Registries Update. + */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryUpdate.json + */ + /** + * Sample code: RegistryUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Registry resource = manager.registries() + .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withSku(new Sku().withName(SkuName.STANDARD)) + .withAdminUserEnabled(true) + .withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS) + .apply(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### Replications_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Replications Create. + */ +public final class ReplicationsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationCreate.json + */ + /** + * Sample code: ReplicationCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .define("myReplication") + .withRegion("eastus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json + */ + /** + * Sample code: ReplicationCreateZoneRedundant. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void replicationCreateZoneRedundant( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .define("myReplication") + .withRegion("eastus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties( + new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) + .create(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### Replications_Delete + +```java +/** + * Samples for Replications Delete. + */ +public final class ReplicationsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationDelete.json + */ + /** + * Sample code: ReplicationDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .delete("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); + } +} +``` + +### Replications_Get + +```java +/** + * Samples for Replications Get. + */ +public final class ReplicationsGetSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationGet.json + */ + /** + * Sample code: ReplicationGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); + } +} +``` + +### Replications_List + +```java +/** + * Samples for Replications List. + */ +public final class ReplicationsListSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationList.json + */ + /** + * Sample code: ReplicationList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Replications_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Replications Update. + */ +public final class ReplicationsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationUpdate.json + */ + /** + * Sample code: ReplicationUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Replication resource = manager.replications() + .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### ScopeMaps_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.util.Arrays; + +/** + * Samples for ScopeMaps Create. + */ +public final class ScopeMapsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapCreate.json + */ + /** + * Sample code: ScopeMapCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps() + .define("myScopeMap") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new ScopeMapProperties().withDescription("Developer Scopes") + .withActions( + Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/delete"))) + .create(); + } +} +``` + +### ScopeMaps_Delete + +```java +/** + * Samples for ScopeMaps Delete. + */ +public final class ScopeMapsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapDelete.json + */ + /** + * Sample code: ScopeMapDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps().delete("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); + } +} +``` + +### ScopeMaps_Get + +```java +/** + * Samples for ScopeMaps Get. + */ +public final class ScopeMapsGetSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapGet.json + */ + /** + * Sample code: ScopeMapGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); + } +} +``` + +### ScopeMaps_List + +```java +/** + * Samples for ScopeMaps List. + */ +public final class ScopeMapsListSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapList.json + */ + /** + * Sample code: ScopeMapList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### ScopeMaps_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import java.util.Arrays; + +/** + * Samples for ScopeMaps Update. + */ +public final class ScopeMapsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json + */ + /** + * Sample code: ScopeMapUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + ScopeMap resource = manager.scopeMaps() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDescription("Developer Scopes") + .withActions( + Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/contentRead")) + .apply(); + } +} +``` + +### Tokens_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; +import java.util.Arrays; + +/** + * Samples for Tokens Create. + */ +public final class TokensCreateSamples { + /* + * x-ms-original-file: 2025-11-01/TokenCreate.json + */ + /** + * Sample code: TokenCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens() + .define("myToken") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new TokenProperties().withScopeMapId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap") + .withCredentials(new TokenCredentialsProperties() + .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) + .withEncodedPemCertificate("fakeTokenPlaceholder")))) + .withStatus(TokenStatus.DISABLED)) + .create(); + } +} +``` + +### Tokens_Delete + +```java +/** + * Samples for Tokens Delete. + */ +public final class TokensDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/TokenDelete.json + */ + /** + * Sample code: TokenDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().delete("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); + } +} +``` + +### Tokens_Get + +```java +/** + * Samples for Tokens Get. + */ +public final class TokensGetSamples { + /* + * x-ms-original-file: 2025-11-01/TokenGet.json + */ + /** + * Sample code: TokenGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); + } +} +``` + +### Tokens_List + +```java +/** + * Samples for Tokens List. + */ +public final class TokensListSamples { + /* + * x-ms-original-file: 2025-11-01/TokenList.json + */ + /** + * Sample code: TokenList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Tokens_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.Token; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import java.util.Arrays; + +/** + * Samples for Tokens Update. + */ +public final class TokensUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/TokenUpdate.json + */ + /** + * Sample code: TokenUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Token resource = manager.tokens() + .getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withScopeMapId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap") + .withCredentials(new TokenCredentialsProperties() + .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) + .withEncodedPemCertificate("fakeTokenPlaceholder")))) + .apply(); + } +} +``` + +### Webhooks_Create + +```java +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Webhooks Create. + */ +public final class WebhooksCreateSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookCreate.json + */ + /** + * Sample code: WebhookCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .define("myWebhook") + .withRegion("westus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withServiceUri("http://myservice.com") + .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) + .withStatus(WebhookStatus.ENABLED) + .withScope("myRepository") + .withActions(Arrays.asList(WebhookAction.PUSH)) + .create(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### Webhooks_Delete + +```java +/** + * Samples for Webhooks Delete. + */ +public final class WebhooksDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookDelete.json + */ + /** + * Sample code: WebhookDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().delete("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_Get + +```java +/** + * Samples for Webhooks Get. + */ +public final class WebhooksGetSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookGet.json + */ + /** + * Sample code: WebhookGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_GetCallbackConfig + +```java +/** + * Samples for Webhooks GetCallbackConfig. + */ +public final class WebhooksGetCallbackConfigSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json + */ + /** + * Sample code: WebhookGetCallbackConfig. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void webhookGetCallbackConfig( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .getCallbackConfigWithResponse("myResourceGroup", "myRegistry", "myWebhook", + com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_List + +```java +/** + * Samples for Webhooks List. + */ +public final class WebhooksListSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookList.json + */ + /** + * Sample code: WebhookList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_ListEvents + +```java +/** + * Samples for Webhooks ListEvents. + */ +public final class WebhooksListEventsSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookListEvents.json + */ + /** + * Sample code: WebhookListEvents. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookListEvents(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().listEvents("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_Ping + +```java +/** + * Samples for Webhooks Ping. + */ +public final class WebhooksPingSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookPing.json + */ + /** + * Sample code: WebhookPing. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookPing(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .pingWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} +``` + +### Webhooks_Update + +```java +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Webhooks Update. + */ +public final class WebhooksUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookUpdate.json + */ + /** + * Sample code: WebhookUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Webhook resource = manager.webhooks() + .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withServiceUri("http://myservice.com") + .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) + .withStatus(WebhookStatus.ENABLED) + .withScope("myRepository") + .withActions(Arrays.asList(WebhookAction.PUSH)) + .apply(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml new file mode 100644 index 000000000000..98db8e7bd96e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-containerregistry-generated + 1.0.0 + jar + + Microsoft Azure SDK for ContainerRegistry Management + This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + + + + com.azure + azure-core + 1.57.1 + + + com.azure + azure-core-management + 1.19.3 + + + com.azure + azure-core-test + 1.27.0-beta.14 + test + + + com.azure + azure-identity + 1.18.1 + test + + + diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java new file mode 100644 index 000000000000..742742a97687 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient; +import com.azure.resourcemanager.containerregistry.generated.implementation.CacheRulesImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.ConnectedRegistriesImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder; +import com.azure.resourcemanager.containerregistry.generated.implementation.CredentialSetsImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.OperationsImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.RegistriesImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.ReplicationsImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.ScopeMapsImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.TokensImpl; +import com.azure.resourcemanager.containerregistry.generated.implementation.WebhooksImpl; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRules; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistries; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSets; +import com.azure.resourcemanager.containerregistry.generated.models.Operations; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnections; +import com.azure.resourcemanager.containerregistry.generated.models.Registries; +import com.azure.resourcemanager.containerregistry.generated.models.Replications; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMaps; +import com.azure.resourcemanager.containerregistry.generated.models.Tokens; +import com.azure.resourcemanager.containerregistry.generated.models.Webhooks; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to ContainerRegistryManager. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +public final class ContainerRegistryManager { + private Operations operations; + + private Registries registries; + + private CacheRules cacheRules; + + private CredentialSets credentialSets; + + private ConnectedRegistries connectedRegistries; + + private PrivateEndpointConnections privateEndpointConnections; + + private Replications replications; + + private ScopeMaps scopeMaps; + + private Tokens tokens; + + private Webhooks webhooks; + + private final ContainerRegistryManagementClient clientObject; + + private ContainerRegistryManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new ContainerRegistryManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of ContainerRegistry service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerRegistry service API instance. + */ + public static ContainerRegistryManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of ContainerRegistry service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the ContainerRegistry service API instance. + */ + public static ContainerRegistryManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new ContainerRegistryManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create ContainerRegistryManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new ContainerRegistryManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-containerregistry-generated.properties"); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of ContainerRegistry service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerRegistry service API instance. + */ + public ContainerRegistryManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.containerregistry.generated") + .append("/") + .append(clientVersion); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new ContainerRegistryManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of Registries. It manages Registry. + * + * @return Resource collection API of Registries. + */ + public Registries registries() { + if (this.registries == null) { + this.registries = new RegistriesImpl(clientObject.getRegistries(), this); + } + return registries; + } + + /** + * Gets the resource collection API of CacheRules. It manages CacheRule. + * + * @return Resource collection API of CacheRules. + */ + public CacheRules cacheRules() { + if (this.cacheRules == null) { + this.cacheRules = new CacheRulesImpl(clientObject.getCacheRules(), this); + } + return cacheRules; + } + + /** + * Gets the resource collection API of CredentialSets. It manages CredentialSet. + * + * @return Resource collection API of CredentialSets. + */ + public CredentialSets credentialSets() { + if (this.credentialSets == null) { + this.credentialSets = new CredentialSetsImpl(clientObject.getCredentialSets(), this); + } + return credentialSets; + } + + /** + * Gets the resource collection API of ConnectedRegistries. It manages ConnectedRegistry. + * + * @return Resource collection API of ConnectedRegistries. + */ + public ConnectedRegistries connectedRegistries() { + if (this.connectedRegistries == null) { + this.connectedRegistries = new ConnectedRegistriesImpl(clientObject.getConnectedRegistries(), this); + } + return connectedRegistries; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of Replications. It manages Replication. + * + * @return Resource collection API of Replications. + */ + public Replications replications() { + if (this.replications == null) { + this.replications = new ReplicationsImpl(clientObject.getReplications(), this); + } + return replications; + } + + /** + * Gets the resource collection API of ScopeMaps. It manages ScopeMap. + * + * @return Resource collection API of ScopeMaps. + */ + public ScopeMaps scopeMaps() { + if (this.scopeMaps == null) { + this.scopeMaps = new ScopeMapsImpl(clientObject.getScopeMaps(), this); + } + return scopeMaps; + } + + /** + * Gets the resource collection API of Tokens. It manages Token. + * + * @return Resource collection API of Tokens. + */ + public Tokens tokens() { + if (this.tokens == null) { + this.tokens = new TokensImpl(clientObject.getTokens(), this); + } + return tokens; + } + + /** + * Gets the resource collection API of Webhooks. It manages Webhook. + * + * @return Resource collection API of Webhooks. + */ + public Webhooks webhooks() { + if (this.webhooks == null) { + this.webhooks = new WebhooksImpl(clientObject.getWebhooks(), this); + } + return webhooks; + } + + /** + * Gets wrapped service client ContainerRegistryManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client ContainerRegistryManagementClient. + */ + public ContainerRegistryManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java new file mode 100644 index 000000000000..ab2a18209de1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in CacheRulesClient. + */ +public interface CacheRulesClient { + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, + Context context); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, Context context); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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> beginDelete(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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> beginDelete(String resourceGroupName, String registryName, String cacheRuleName, + Context context); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java new file mode 100644 index 000000000000..acece2d185ee --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in ConnectedRegistriesClient. + */ +public interface ConnectedRegistriesClient { + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context); + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner get(String resourceGroupName, String registryName, String connectedRegistryName); + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, + String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters); + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, + String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, + Context context); + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters); + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters, Context context); + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, + String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters); + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, + String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context); + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters); + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDelete(String resourceGroupName, String registryName, + String connectedRegistryName); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDelete(String resourceGroupName, String registryName, + String connectedRegistryName, Context context); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 registryName, String connectedRegistryName); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDeactivate(String resourceGroupName, String registryName, + String connectedRegistryName); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDeactivate(String resourceGroupName, String registryName, + String connectedRegistryName, Context context); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java new file mode 100644 index 000000000000..4c8b76ba8d04 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for ContainerRegistryManagementClient class. + */ +public interface ContainerRegistryManagementClient { + /** + * Gets Service host. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Version parameter. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + RegistriesClient getRegistries(); + + /** + * Gets the CacheRulesClient object to access its operations. + * + * @return the CacheRulesClient object. + */ + CacheRulesClient getCacheRules(); + + /** + * Gets the CredentialSetsClient object to access its operations. + * + * @return the CredentialSetsClient object. + */ + CredentialSetsClient getCredentialSets(); + + /** + * Gets the ConnectedRegistriesClient object to access its operations. + * + * @return the ConnectedRegistriesClient object. + */ + ConnectedRegistriesClient getConnectedRegistries(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the ReplicationsClient object to access its operations. + * + * @return the ReplicationsClient object. + */ + ReplicationsClient getReplications(); + + /** + * Gets the ScopeMapsClient object to access its operations. + * + * @return the ScopeMapsClient object. + */ + ScopeMapsClient getScopeMaps(); + + /** + * Gets the TokensClient object to access its operations. + * + * @return the TokensClient object. + */ + TokensClient getTokens(); + + /** + * Gets the WebhooksClient object to access its operations. + * + * @return the WebhooksClient object. + */ + WebhooksClient getWebhooks(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java new file mode 100644 index 000000000000..9e929bac6bf9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in CredentialSetsClient. + */ +public interface CredentialSetsClient { + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String credentialSetName, Context context); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, + Context context); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetInner credentialSetCreateParameters, Context context); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, Context context); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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> beginDelete(String resourceGroupName, String registryName, + String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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> beginDelete(String resourceGroupName, String registryName, + String credentialSetName, Context context); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java new file mode 100644 index 000000000000..d6cf0a6aef5f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..0a05b60605ca --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; + +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ +public interface PrivateEndpointConnectionsClient { + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context); + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String registryName, + String privateEndpointConnectionName); + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection); + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection, Context context); + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection); + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, + Context context); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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> beginDelete(String resourceGroupName, String registryName, + String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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> beginDelete(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 registryName, String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, Context context); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java new file mode 100644 index 000000000000..e4123f71cb9c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in RegistriesClient. + */ +public interface RegistriesClient { + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context); + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreate(String resourceGroupName, String registryName, + RegistryInner registry); + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreate(String resourceGroupName, String registryName, + RegistryInner registry, Context context); + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry); + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry, Context context); + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters); + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters, Context context); + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner update(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters); + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner update(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters, Context context); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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> beginDelete(String resourceGroupName, String registryName); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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> beginDelete(String resourceGroupName, String registryName, Context context); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 registryName); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 delete(String resourceGroupName, String registryName, Context context); + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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> beginImportImage(String resourceGroupName, String registryName, + ImportImageParameters parameters); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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> beginImportImage(String resourceGroupName, String registryName, + ImportImageParameters parameters, Context context); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, Context context); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName); + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 response from the ListCredentials operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCredentialsWithResponse(String resourceGroupName, + String registryName, Context context); + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 response from the ListCredentials operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> beginGenerateCredentials( + String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> beginGenerateCredentials( + String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters, + Context context); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourceWithResponse(String resourceGroupName, String registryName, + String groupName, Context context); + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, String registryName, String groupName); + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, + Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java new file mode 100644 index 000000000000..999bc50c56a2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in ReplicationsClient. + */ +public interface ReplicationsClient { + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String replicationName, + Context context); + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicationInner get(String resourceGroupName, String registryName, String replicationName); + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication); + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication, Context context); + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicationInner create(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication); + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicationInner create(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication, Context context); + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters); + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, + Context context); + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicationInner update(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters); + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicationInner update(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters, Context context); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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> beginDelete(String resourceGroupName, String registryName, + String replicationName); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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> beginDelete(String resourceGroupName, String registryName, + String replicationName, Context context); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 registryName, String replicationName); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java new file mode 100644 index 000000000000..718aef322eca --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ScopeMapInner; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in ScopeMapsClient. + */ +public interface ScopeMapsClient { + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, + Context context); + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopeMapInner get(String resourceGroupName, String registryName, String scopeMapName); + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapInner scopeMapCreateParameters); + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context); + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters); + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters, Context context); + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters); + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters); + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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> beginDelete(String resourceGroupName, String registryName, String scopeMapName); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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> beginDelete(String resourceGroupName, String registryName, String scopeMapName, + Context context); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 registryName, String scopeMapName); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java new file mode 100644 index 000000000000..f00d83f1bb28 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.TokenInner; +import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in TokensClient. + */ +public interface TokensClient { + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String tokenName, + Context context); + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TokenInner get(String resourceGroupName, String registryName, String tokenName); + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters); + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters, Context context); + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TokenInner create(String resourceGroupName, String registryName, String tokenName, + TokenInner tokenCreateParameters); + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TokenInner create(String resourceGroupName, String registryName, String tokenName, TokenInner tokenCreateParameters, + Context context); + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters); + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context); + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TokenInner update(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters); + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TokenInner update(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters, Context context); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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> beginDelete(String resourceGroupName, String registryName, String tokenName); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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> beginDelete(String resourceGroupName, String registryName, String tokenName, + Context context); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 registryName, String tokenName); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java new file mode 100644 index 000000000000..b7b3e1147c46 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CallbackConfigInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in WebhooksClient. + */ +public interface WebhooksClient { + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookInner get(String resourceGroupName, String registryName, String webhookName); + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters); + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters, Context context); + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookInner create(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters); + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookInner create(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters, Context context); + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters); + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context); + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookInner update(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters); + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookInner update(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters, Context context); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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> beginDelete(String resourceGroupName, String registryName, String webhookName); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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> beginDelete(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 registryName, String webhookName); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventInfoInner ping(String resourceGroupName, String registryName, String webhookName); + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName); + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java new file mode 100644 index 000000000000..f387d2df4787 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; +import java.io.IOException; + +/** + * An object that represents a cache rule for a container registry. + */ +@Fluent +public final class CacheRuleInner extends ProxyResource { + /* + * The properties of the cache rule. + */ + private CacheRuleProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of CacheRuleInner class. + */ + public CacheRuleInner() { + } + + /** + * Get the properties property: The properties of the cache rule. + * + * @return the properties value. + */ + public CacheRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the cache rule. + * + * @param properties the properties value to set. + * @return the CacheRuleInner object itself. + */ + public CacheRuleInner withProperties(CacheRuleProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheRuleInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CacheRuleInner. + */ + public static CacheRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheRuleInner deserializedCacheRuleInner = new CacheRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCacheRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCacheRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCacheRuleInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCacheRuleInner.properties = CacheRuleProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCacheRuleInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheRuleInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java new file mode 100644 index 000000000000..3e6974afdd6f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The parameters for updating cache rule properties. + */ +@Fluent +public final class CacheRuleUpdateProperties implements JsonSerializable { + /* + * The ARM resource ID of the credential store which is associated with the Cache rule. + */ + private String credentialSetResourceId; + + /** + * Creates an instance of CacheRuleUpdateProperties class. + */ + public CacheRuleUpdateProperties() { + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.credentialSetResourceId; + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleUpdateProperties object itself. + */ + public CacheRuleUpdateProperties withCredentialSetResourceId(String credentialSetResourceId) { + this.credentialSetResourceId = credentialSetResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("credentialSetResourceId", this.credentialSetResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheRuleUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheRuleUpdateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheRuleUpdateProperties. + */ + public static CacheRuleUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheRuleUpdateProperties deserializedCacheRuleUpdateProperties = new CacheRuleUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("credentialSetResourceId".equals(fieldName)) { + deserializedCacheRuleUpdateProperties.credentialSetResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheRuleUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java new file mode 100644 index 000000000000..6d9432b5da0c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The configuration of service URI and custom headers for the webhook. + */ +@Immutable +public final class CallbackConfigInner implements JsonSerializable { + /* + * The service URI for the webhook to post notifications. + */ + private String serviceUri; + + /* + * Custom headers that will be added to the webhook notifications. + */ + private Map customHeaders; + + /** + * Creates an instance of CallbackConfigInner class. + */ + private CallbackConfigInner() { + } + + /** + * Get the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Get the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + public Map customHeaders() { + return this.customHeaders; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceUri", this.serviceUri); + jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CallbackConfigInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CallbackConfigInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CallbackConfigInner. + */ + public static CallbackConfigInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallbackConfigInner deserializedCallbackConfigInner = new CallbackConfigInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceUri".equals(fieldName)) { + deserializedCallbackConfigInner.serviceUri = reader.getString(); + } else if ("customHeaders".equals(fieldName)) { + Map customHeaders = reader.readMap(reader1 -> reader1.getString()); + deserializedCallbackConfigInner.customHeaders = customHeaders; + } else { + reader.skipChildren(); + } + } + + return deserializedCallbackConfigInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java new file mode 100644 index 000000000000..2252dfd24c2e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; +import java.io.IOException; + +/** + * An object that represents a connected registry for a container registry. + */ +@Fluent +public final class ConnectedRegistryInner extends ProxyResource { + /* + * The properties of the connected registry. + */ + private ConnectedRegistryProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ConnectedRegistryInner class. + */ + public ConnectedRegistryInner() { + } + + /** + * Get the properties property: The properties of the connected registry. + * + * @return the properties value. + */ + public ConnectedRegistryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the connected registry. + * + * @param properties the properties value to set. + * @return the ConnectedRegistryInner object itself. + */ + public ConnectedRegistryInner withProperties(ConnectedRegistryProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedRegistryInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedRegistryInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedRegistryInner. + */ + public static ConnectedRegistryInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedRegistryInner deserializedConnectedRegistryInner = new ConnectedRegistryInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedConnectedRegistryInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedConnectedRegistryInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedConnectedRegistryInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedConnectedRegistryInner.properties = ConnectedRegistryProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedConnectedRegistryInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedRegistryInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java new file mode 100644 index 000000000000..c2fa9b1074e9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; +import java.io.IOException; +import java.util.List; + +/** + * The parameters for updating token properties. + */ +@Fluent +public final class ConnectedRegistryUpdateProperties implements JsonSerializable { + /* + * The sync properties of the connected registry with its parent. + */ + private SyncUpdateProperties syncProperties; + + /* + * The logging properties of the connected registry. + */ + private LoggingProperties logging; + + /* + * The list of the ACR token resource IDs used to authenticate clients to the connected registry. + */ + private List clientTokenIds; + + /* + * The list of notifications subscription information for the connected registry. + */ + private List notificationsList; + + /* + * The garbage collection properties of the connected registry. + */ + private GarbageCollectionProperties garbageCollection; + + /** + * Creates an instance of ConnectedRegistryUpdateProperties class. + */ + public ConnectedRegistryUpdateProperties() { + } + + /** + * Get the syncProperties property: The sync properties of the connected registry with its parent. + * + * @return the syncProperties value. + */ + public SyncUpdateProperties syncProperties() { + return this.syncProperties; + } + + /** + * Set the syncProperties property: The sync properties of the connected registry with its parent. + * + * @param syncProperties the syncProperties value to set. + * @return the ConnectedRegistryUpdateProperties object itself. + */ + public ConnectedRegistryUpdateProperties withSyncProperties(SyncUpdateProperties syncProperties) { + this.syncProperties = syncProperties; + return this; + } + + /** + * Get the logging property: The logging properties of the connected registry. + * + * @return the logging value. + */ + public LoggingProperties logging() { + return this.logging; + } + + /** + * Set the logging property: The logging properties of the connected registry. + * + * @param logging the logging value to set. + * @return the ConnectedRegistryUpdateProperties object itself. + */ + public ConnectedRegistryUpdateProperties withLogging(LoggingProperties logging) { + this.logging = logging; + return this; + } + + /** + * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @return the clientTokenIds value. + */ + public List clientTokenIds() { + return this.clientTokenIds; + } + + /** + * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @param clientTokenIds the clientTokenIds value to set. + * @return the ConnectedRegistryUpdateProperties object itself. + */ + public ConnectedRegistryUpdateProperties withClientTokenIds(List clientTokenIds) { + this.clientTokenIds = clientTokenIds; + return this; + } + + /** + * Get the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @return the notificationsList value. + */ + public List notificationsList() { + return this.notificationsList; + } + + /** + * Set the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @param notificationsList the notificationsList value to set. + * @return the ConnectedRegistryUpdateProperties object itself. + */ + public ConnectedRegistryUpdateProperties withNotificationsList(List notificationsList) { + this.notificationsList = notificationsList; + return this; + } + + /** + * Get the garbageCollection property: The garbage collection properties of the connected registry. + * + * @return the garbageCollection value. + */ + public GarbageCollectionProperties garbageCollection() { + return this.garbageCollection; + } + + /** + * Set the garbageCollection property: The garbage collection properties of the connected registry. + * + * @param garbageCollection the garbageCollection value to set. + * @return the ConnectedRegistryUpdateProperties object itself. + */ + public ConnectedRegistryUpdateProperties withGarbageCollection(GarbageCollectionProperties garbageCollection) { + this.garbageCollection = garbageCollection; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("syncProperties", this.syncProperties); + jsonWriter.writeJsonField("logging", this.logging); + jsonWriter.writeArrayField("clientTokenIds", this.clientTokenIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notificationsList", this.notificationsList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("garbageCollection", this.garbageCollection); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedRegistryUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedRegistryUpdateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedRegistryUpdateProperties. + */ + public static ConnectedRegistryUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedRegistryUpdateProperties deserializedConnectedRegistryUpdateProperties + = new ConnectedRegistryUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("syncProperties".equals(fieldName)) { + deserializedConnectedRegistryUpdateProperties.syncProperties + = SyncUpdateProperties.fromJson(reader); + } else if ("logging".equals(fieldName)) { + deserializedConnectedRegistryUpdateProperties.logging = LoggingProperties.fromJson(reader); + } else if ("clientTokenIds".equals(fieldName)) { + List clientTokenIds = reader.readArray(reader1 -> reader1.getString()); + deserializedConnectedRegistryUpdateProperties.clientTokenIds = clientTokenIds; + } else if ("notificationsList".equals(fieldName)) { + List notificationsList = reader.readArray(reader1 -> reader1.getString()); + deserializedConnectedRegistryUpdateProperties.notificationsList = notificationsList; + } else if ("garbageCollection".equals(fieldName)) { + deserializedConnectedRegistryUpdateProperties.garbageCollection + = GarbageCollectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedRegistryUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java new file mode 100644 index 000000000000..8ae85aa3671e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import java.io.IOException; + +/** + * An object that represents a credential set resource for a container registry. + */ +@Fluent +public final class CredentialSetInner extends ProxyResource { + /* + * The properties of the credential set. + */ + private CredentialSetProperties properties; + + /* + * Identities associated with the resource. This is used to access the KeyVault secrets. + */ + private IdentityProperties identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of CredentialSetInner class. + */ + public CredentialSetInner() { + } + + /** + * Get the properties property: The properties of the credential set. + * + * @return the properties value. + */ + public CredentialSetProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the credential set. + * + * @param properties the properties value to set. + * @return the CredentialSetInner object itself. + */ + public CredentialSetInner withProperties(CredentialSetProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @param identity the identity value to set. + * @return the CredentialSetInner object itself. + */ + public CredentialSetInner withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialSetInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialSetInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CredentialSetInner. + */ + public static CredentialSetInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialSetInner deserializedCredentialSetInner = new CredentialSetInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCredentialSetInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCredentialSetInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCredentialSetInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCredentialSetInner.properties = CredentialSetProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedCredentialSetInner.identity = IdentityProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCredentialSetInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialSetInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java new file mode 100644 index 000000000000..849a0834bbba --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import java.io.IOException; +import java.util.List; + +/** + * The parameters for updating credential set properties. + */ +@Fluent +public final class CredentialSetUpdateProperties implements JsonSerializable { + /* + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + private List authCredentials; + + /** + * Creates an instance of CredentialSetUpdateProperties class. + */ + public CredentialSetUpdateProperties() { + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.authCredentials; + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetUpdateProperties object itself. + */ + public CredentialSetUpdateProperties withAuthCredentials(List authCredentials) { + this.authCredentials = authCredentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("authCredentials", this.authCredentials, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialSetUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialSetUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CredentialSetUpdateProperties. + */ + public static CredentialSetUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialSetUpdateProperties deserializedCredentialSetUpdateProperties + = new CredentialSetUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authCredentials".equals(fieldName)) { + List authCredentials + = reader.readArray(reader1 -> AuthCredential.fromJson(reader1)); + deserializedCredentialSetUpdateProperties.authCredentials = authCredentials; + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialSetUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java new file mode 100644 index 000000000000..59132f1e6d11 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The basic information of an event. + */ +@Immutable +public class EventInfoInner implements JsonSerializable { + /* + * The event ID. + */ + private String id; + + /** + * Creates an instance of EventInfoInner class. + */ + protected EventInfoInner() { + } + + /** + * Get the id property: The event ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The event ID. + * + * @param id the id value to set. + * @return the EventInfoInner object itself. + */ + EventInfoInner withId(String id) { + this.id = id; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EventInfoInner. + */ + public static EventInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventInfoInner deserializedEventInfoInner = new EventInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventInfoInner.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventInfoInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java new file mode 100644 index 000000000000..0cf729512e6a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; +import com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage; +import java.io.IOException; + +/** + * The event for a webhook. + */ +@Immutable +public final class EventInner extends EventInfoInner { + /* + * The event request message sent to the service URI. + */ + private EventRequestMessage eventRequestMessage; + + /* + * The event response message received from the service URI. + */ + private EventResponseMessage eventResponseMessage; + + /* + * The event ID. + */ + private String id; + + /** + * Creates an instance of EventInner class. + */ + private EventInner() { + } + + /** + * Get the eventRequestMessage property: The event request message sent to the service URI. + * + * @return the eventRequestMessage value. + */ + public EventRequestMessage eventRequestMessage() { + return this.eventRequestMessage; + } + + /** + * Get the eventResponseMessage property: The event response message received from the service URI. + * + * @return the eventResponseMessage value. + */ + public EventResponseMessage eventResponseMessage() { + return this.eventResponseMessage; + } + + /** + * Get the id property: The event ID. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeJsonField("eventRequestMessage", this.eventRequestMessage); + jsonWriter.writeJsonField("eventResponseMessage", this.eventResponseMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the EventInner. + */ + public static EventInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventInner deserializedEventInner = new EventInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventInner.id = reader.getString(); + } else if ("eventRequestMessage".equals(fieldName)) { + deserializedEventInner.eventRequestMessage = EventRequestMessage.fromJson(reader); + } else if ("eventResponseMessage".equals(fieldName)) { + deserializedEventInner.eventResponseMessage = EventResponseMessage.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java new file mode 100644 index 000000000000..4e3cf87e840f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; +import java.io.IOException; +import java.util.List; + +/** + * The response from the GenerateCredentials operation. + */ +@Immutable +public final class GenerateCredentialsResultInner implements JsonSerializable { + /* + * The username for a container registry. + */ + private String username; + + /* + * The list of passwords for a container registry. + */ + private List passwords; + + /** + * Creates an instance of GenerateCredentialsResultInner class. + */ + private GenerateCredentialsResultInner() { + } + + /** + * Get the username property: The username for a container registry. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Get the passwords property: The list of passwords for a container registry. + * + * @return the passwords value. + */ + public List passwords() { + return this.passwords; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GenerateCredentialsResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GenerateCredentialsResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GenerateCredentialsResultInner. + */ + public static GenerateCredentialsResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GenerateCredentialsResultInner deserializedGenerateCredentialsResultInner + = new GenerateCredentialsResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedGenerateCredentialsResultInner.username = reader.getString(); + } else if ("passwords".equals(fieldName)) { + List passwords = reader.readArray(reader1 -> TokenPassword.fromJson(reader1)); + deserializedGenerateCredentialsResultInner.passwords = passwords; + } else { + reader.skipChildren(); + } + } + + return deserializedGenerateCredentialsResultInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java new file mode 100644 index 000000000000..3512c682db00 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; +import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; +import java.io.IOException; + +/** + * The definition of a container registry operation. + */ +@Immutable +public final class OperationDefinitionInner implements JsonSerializable { + /* + * The origin information of the container registry operation. + */ + private String origin; + + /* + * Operation name: {provider}/{resource}/{operation}. + */ + private String name; + + /* + * The display information for the container registry operation. + */ + private OperationDisplayDefinition display; + + /* + * The properties information for the container registry operation. + */ + private OperationPropertiesDefinition innerProperties; + + /* + * This property indicates if the operation is an action or a data action + * ref: + * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations + */ + private Boolean isDataAction; + + /** + * Creates an instance of OperationDefinitionInner class. + */ + private OperationDefinitionInner() { + } + + /** + * Get the origin property: The origin information of the container registry operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Get the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the display property: The display information for the container registry operation. + * + * @return the display value. + */ + public OperationDisplayDefinition display() { + return this.display; + } + + /** + * Get the innerProperties property: The properties information for the container registry operation. + * + * @return the innerProperties value. + */ + private OperationPropertiesDefinition innerProperties() { + return this.innerProperties; + } + + /** + * Get the isDataAction property: This property indicates if the operation is an action or a data action + * ref: + * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the serviceSpecification property: The definition of Azure Monitoring service. + * + * @return the serviceSpecification value. + */ + public OperationServiceSpecificationDefinition serviceSpecification() { + return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("origin", this.origin); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDefinitionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDefinitionInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDefinitionInner. + */ + public static OperationDefinitionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDefinitionInner deserializedOperationDefinitionInner = new OperationDefinitionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("origin".equals(fieldName)) { + deserializedOperationDefinitionInner.origin = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationDefinitionInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationDefinitionInner.display = OperationDisplayDefinition.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedOperationDefinitionInner.innerProperties + = OperationPropertiesDefinition.fromJson(reader); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationDefinitionInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDefinitionInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java new file mode 100644 index 000000000000..bd12f4ad7427 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; +import java.io.IOException; + +/** + * The definition of Azure Monitoring properties. + */ +@Immutable +public final class OperationPropertiesDefinition implements JsonSerializable { + /* + * The definition of Azure Monitoring service. + */ + private OperationServiceSpecificationDefinition serviceSpecification; + + /** + * Creates an instance of OperationPropertiesDefinition class. + */ + private OperationPropertiesDefinition() { + } + + /** + * Get the serviceSpecification property: The definition of Azure Monitoring service. + * + * @return the serviceSpecification value. + */ + public OperationServiceSpecificationDefinition serviceSpecification() { + return this.serviceSpecification; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("serviceSpecification", this.serviceSpecification); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationPropertiesDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationPropertiesDefinition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationPropertiesDefinition. + */ + public static OperationPropertiesDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationPropertiesDefinition deserializedOperationPropertiesDefinition + = new OperationPropertiesDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceSpecification".equals(fieldName)) { + deserializedOperationPropertiesDefinition.serviceSpecification + = OperationServiceSpecificationDefinition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationPropertiesDefinition; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..257b232e1dc3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import java.io.IOException; + +/** + * An object that represents a private endpoint connection for a container registry. + */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * The properties of a private endpoint connection. + */ + private PrivateEndpointConnectionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ + public PrivateEndpointConnectionInner() { + } + + /** + * Get the properties property: The properties of a private endpoint connection. + * + * @return the properties value. + */ + public PrivateEndpointConnectionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of a private endpoint connection. + * + * @param properties the properties value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.properties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..92d0d7c909e2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; +import java.io.IOException; + +/** + * A private link resource. + */ +@Immutable +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * A resource that supports private link capabilities. + */ + private PrivateLinkResourceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ + private PrivateLinkResourceInner() { + } + + /** + * Get the properties property: A resource that supports private link capabilities. + * + * @return the properties value. + */ + public PrivateLinkResourceProperties properties() { + return this.properties; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java new file mode 100644 index 000000000000..5b32d96a3cba --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * An object that represents a container registry. + */ +@Fluent +public final class RegistryInner extends Resource { + /* + * The properties of the container registry. + */ + private RegistryProperties properties; + + /* + * The SKU of the container registry. + */ + private Sku sku; + + /* + * The identity of the container registry. + */ + private IdentityProperties identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RegistryInner class. + */ + public RegistryInner() { + } + + /** + * Get the properties property: The properties of the container registry. + * + * @return the properties value. + */ + public RegistryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the container registry. + * + * @param properties the properties value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withProperties(RegistryProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the sku property: The SKU of the container registry. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the container registry. + * + * @param sku the sku value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the identity property: The identity of the container registry. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the container registry. + * + * @param identity the identity value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public RegistryInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public RegistryInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RegistryInner. + */ + public static RegistryInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryInner deserializedRegistryInner = new RegistryInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRegistryInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRegistryInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRegistryInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedRegistryInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedRegistryInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedRegistryInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedRegistryInner.properties = RegistryProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedRegistryInner.identity = IdentityProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRegistryInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java new file mode 100644 index 000000000000..db166fef322f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; +import java.io.IOException; +import java.util.List; + +/** + * The response from the ListCredentials operation. + */ +@Immutable +public final class RegistryListCredentialsResultInner implements JsonSerializable { + /* + * The username for a container registry. + */ + private String username; + + /* + * The list of passwords for a container registry. + */ + private List passwords; + + /** + * Creates an instance of RegistryListCredentialsResultInner class. + */ + private RegistryListCredentialsResultInner() { + } + + /** + * Get the username property: The username for a container registry. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Get the passwords property: The list of passwords for a container registry. + * + * @return the passwords value. + */ + public List passwords() { + return this.passwords; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryListCredentialsResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryListCredentialsResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryListCredentialsResultInner. + */ + public static RegistryListCredentialsResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryListCredentialsResultInner deserializedRegistryListCredentialsResultInner + = new RegistryListCredentialsResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedRegistryListCredentialsResultInner.username = reader.getString(); + } else if ("passwords".equals(fieldName)) { + List passwords = reader.readArray(reader1 -> RegistryPassword.fromJson(reader1)); + deserializedRegistryListCredentialsResultInner.passwords = passwords; + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryListCredentialsResultInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java new file mode 100644 index 000000000000..614b8d563b5a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The result of a request to check the availability of a container registry name. + */ +@Immutable +public final class RegistryNameStatusInner implements JsonSerializable { + /* + * The value that indicates whether the name is available. + */ + private Boolean nameAvailable; + + /* + * If any, the reason that the name is not available. + */ + private String reason; + + /* + * If any, the error message that provides more detail for the reason that the name is not available. + */ + private String message; + + /** + * Creates an instance of RegistryNameStatusInner class. + */ + private RegistryNameStatusInner() { + } + + /** + * Get the nameAvailable property: The value that indicates whether the name is available. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get the reason property: If any, the reason that the name is not available. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Get the message property: If any, the error message that provides more detail for the reason that the name is not + * available. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable); + jsonWriter.writeStringField("reason", this.reason); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryNameStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryNameStatusInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryNameStatusInner. + */ + public static RegistryNameStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryNameStatusInner deserializedRegistryNameStatusInner = new RegistryNameStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nameAvailable".equals(fieldName)) { + deserializedRegistryNameStatusInner.nameAvailable = reader.getNullable(JsonReader::getBoolean); + } else if ("reason".equals(fieldName)) { + deserializedRegistryNameStatusInner.reason = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedRegistryNameStatusInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryNameStatusInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java new file mode 100644 index 000000000000..73cde11a3e37 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty; +import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions; +import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; +import com.azure.resourcemanager.containerregistry.generated.models.Policies; +import com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import java.io.IOException; + +/** + * The parameters for updating the properties of a container registry. + */ +@Fluent +public final class RegistryPropertiesUpdateParameters implements JsonSerializable { + /* + * The value that indicates whether the admin user is enabled. + */ + private Boolean adminUserEnabled; + + /* + * The network rule set for a container registry. + */ + private NetworkRuleSet networkRuleSet; + + /* + * The policies for a container registry. + */ + private Policies policies; + + /* + * The encryption settings of container registry. + */ + private EncryptionProperty encryption; + + /* + * Enable a single data endpoint per region for serving data. + */ + private Boolean dataEndpointEnabled; + + /* + * Whether or not public network access is allowed for the container registry. + */ + private PublicNetworkAccess publicNetworkAccess; + + /* + * Whether to allow trusted Azure services to access a network restricted registry. + */ + private NetworkRuleBypassOptions networkRuleBypassOptions; + + /* + * Whether to allow ACR Tasks service to access a network restricted registry. + */ + private Boolean networkRuleBypassAllowedForTasks; + + /* + * Enables registry-wide pull from unauthenticated clients. + */ + private Boolean anonymousPullEnabled; + + /* + * Determines registry role assignment mode. + */ + private RoleAssignmentMode roleAssignmentMode; + + /** + * Creates an instance of RegistryPropertiesUpdateParameters class. + */ + public RegistryPropertiesUpdateParameters() { + } + + /** + * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @return the adminUserEnabled value. + */ + public Boolean adminUserEnabled() { + return this.adminUserEnabled; + } + + /** + * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @param adminUserEnabled the adminUserEnabled value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) { + this.adminUserEnabled = adminUserEnabled; + return this; + } + + /** + * Get the networkRuleSet property: The network rule set for a container registry. + * + * @return the networkRuleSet value. + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set the networkRuleSet property: The network rule set for a container registry. + * + * @param networkRuleSet the networkRuleSet value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get the policies property: The policies for a container registry. + * + * @return the policies value. + */ + public Policies policies() { + return this.policies; + } + + /** + * Set the policies property: The policies for a container registry. + * + * @param policies the policies value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withPolicies(Policies policies) { + this.policies = policies; + return this; + } + + /** + * Get the encryption property: The encryption settings of container registry. + * + * @return the encryption value. + */ + public EncryptionProperty encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption settings of container registry. + * + * @param encryption the encryption value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withEncryption(EncryptionProperty encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @return the dataEndpointEnabled value. + */ + public Boolean dataEndpointEnabled() { + return this.dataEndpointEnabled; + } + + /** + * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @param dataEndpointEnabled the dataEndpointEnabled value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withDataEndpointEnabled(Boolean dataEndpointEnabled) { + this.dataEndpointEnabled = dataEndpointEnabled; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @return the networkRuleBypassOptions value. + */ + public NetworkRuleBypassOptions networkRuleBypassOptions() { + return this.networkRuleBypassOptions; + } + + /** + * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters + withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { + this.networkRuleBypassOptions = networkRuleBypassOptions; + return this; + } + + /** + * Get the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network + * restricted registry. + * + * @return the networkRuleBypassAllowedForTasks value. + */ + public Boolean networkRuleBypassAllowedForTasks() { + return this.networkRuleBypassAllowedForTasks; + } + + /** + * Set the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network + * restricted registry. + * + * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters + withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { + this.networkRuleBypassAllowedForTasks = networkRuleBypassAllowedForTasks; + return this; + } + + /** + * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @return the anonymousPullEnabled value. + */ + public Boolean anonymousPullEnabled() { + return this.anonymousPullEnabled; + } + + /** + * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @param anonymousPullEnabled the anonymousPullEnabled value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withAnonymousPullEnabled(Boolean anonymousPullEnabled) { + this.anonymousPullEnabled = anonymousPullEnabled; + return this; + } + + /** + * Get the roleAssignmentMode property: Determines registry role assignment mode. + * + * @return the roleAssignmentMode value. + */ + public RoleAssignmentMode roleAssignmentMode() { + return this.roleAssignmentMode; + } + + /** + * Set the roleAssignmentMode property: Determines registry role assignment mode. + * + * @param roleAssignmentMode the roleAssignmentMode value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { + this.roleAssignmentMode = roleAssignmentMode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("adminUserEnabled", this.adminUserEnabled); + jsonWriter.writeJsonField("networkRuleSet", this.networkRuleSet); + jsonWriter.writeJsonField("policies", this.policies); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeStringField("networkRuleBypassOptions", + this.networkRuleBypassOptions == null ? null : this.networkRuleBypassOptions.toString()); + jsonWriter.writeBooleanField("networkRuleBypassAllowedForTasks", this.networkRuleBypassAllowedForTasks); + jsonWriter.writeBooleanField("anonymousPullEnabled", this.anonymousPullEnabled); + jsonWriter.writeStringField("roleAssignmentMode", + this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryPropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryPropertiesUpdateParameters. + */ + public static RegistryPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryPropertiesUpdateParameters deserializedRegistryPropertiesUpdateParameters + = new RegistryPropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminUserEnabled".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.adminUserEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("networkRuleSet".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.networkRuleSet = NetworkRuleSet.fromJson(reader); + } else if ("policies".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.policies = Policies.fromJson(reader); + } else if ("encryption".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.encryption = EncryptionProperty.fromJson(reader); + } else if ("dataEndpointEnabled".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.dataEndpointEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("networkRuleBypassOptions".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.networkRuleBypassOptions + = NetworkRuleBypassOptions.fromString(reader.getString()); + } else if ("networkRuleBypassAllowedForTasks".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.networkRuleBypassAllowedForTasks + = reader.getNullable(JsonReader::getBoolean); + } else if ("anonymousPullEnabled".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.anonymousPullEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("roleAssignmentMode".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.roleAssignmentMode + = RoleAssignmentMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryPropertiesUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java new file mode 100644 index 000000000000..5c538c4370c3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to get container registry quota usages. + */ +@Immutable +public final class RegistryUsageListResultInner implements JsonSerializable { + /* + * The list of container registry quota usages. + */ + private List value; + + /** + * Creates an instance of RegistryUsageListResultInner class. + */ + private RegistryUsageListResultInner() { + } + + /** + * Get the value property: The list of container registry quota usages. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryUsageListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryUsageListResultInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryUsageListResultInner. + */ + public static RegistryUsageListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryUsageListResultInner deserializedRegistryUsageListResultInner = new RegistryUsageListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> RegistryUsage.fromJson(reader1)); + deserializedRegistryUsageListResultInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryUsageListResultInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java new file mode 100644 index 000000000000..2d646eecdb30 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import java.io.IOException; +import java.util.Map; + +/** + * An object that represents a replication for a container registry. + */ +@Fluent +public final class ReplicationInner extends Resource { + /* + * The properties of the replication. + */ + private ReplicationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ReplicationInner class. + */ + public ReplicationInner() { + } + + /** + * Get the properties property: The properties of the replication. + * + * @return the properties value. + */ + public ReplicationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the replication. + * + * @param properties the properties value to set. + * @return the ReplicationInner object itself. + */ + public ReplicationInner withProperties(ReplicationProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ReplicationInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ReplicationInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReplicationInner. + */ + public static ReplicationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationInner deserializedReplicationInner = new ReplicationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedReplicationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedReplicationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedReplicationInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedReplicationInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedReplicationInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedReplicationInner.properties = ReplicationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedReplicationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java new file mode 100644 index 000000000000..bae350af88c5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ReplicationUpdateParametersProperties model. + */ +@Fluent +public final class ReplicationUpdateParametersProperties + implements JsonSerializable { + /* + * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication + * whose regional endpoint is disabled, however its data will continue to be synced with other replications. + */ + private Boolean regionEndpointEnabled; + + /** + * Creates an instance of ReplicationUpdateParametersProperties class. + */ + public ReplicationUpdateParametersProperties() { + } + + /** + * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @return the regionEndpointEnabled value. + */ + public Boolean regionEndpointEnabled() { + return this.regionEndpointEnabled; + } + + /** + * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @param regionEndpointEnabled the regionEndpointEnabled value to set. + * @return the ReplicationUpdateParametersProperties object itself. + */ + public ReplicationUpdateParametersProperties withRegionEndpointEnabled(Boolean regionEndpointEnabled) { + this.regionEndpointEnabled = regionEndpointEnabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("regionEndpointEnabled", this.regionEndpointEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationUpdateParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationUpdateParametersProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationUpdateParametersProperties. + */ + public static ReplicationUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationUpdateParametersProperties deserializedReplicationUpdateParametersProperties + = new ReplicationUpdateParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("regionEndpointEnabled".equals(fieldName)) { + deserializedReplicationUpdateParametersProperties.regionEndpointEnabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationUpdateParametersProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java new file mode 100644 index 000000000000..609180d7f22e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.io.IOException; + +/** + * An object that represents a scope map for a container registry. + */ +@Fluent +public final class ScopeMapInner extends ProxyResource { + /* + * The properties of the scope map. + */ + private ScopeMapProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ScopeMapInner class. + */ + public ScopeMapInner() { + } + + /** + * Get the properties property: The properties of the scope map. + * + * @return the properties value. + */ + public ScopeMapProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the scope map. + * + * @param properties the properties value to set. + * @return the ScopeMapInner object itself. + */ + public ScopeMapInner withProperties(ScopeMapProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopeMapInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopeMapInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScopeMapInner. + */ + public static ScopeMapInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopeMapInner deserializedScopeMapInner = new ScopeMapInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScopeMapInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScopeMapInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScopeMapInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScopeMapInner.properties = ScopeMapProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScopeMapInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScopeMapInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java new file mode 100644 index 000000000000..59409b162b12 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The update parameters for scope map properties. + */ +@Fluent +public final class ScopeMapPropertiesUpdateParameters implements JsonSerializable { + /* + * The user friendly description of the scope map. + */ + private String description; + + /* + * The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete + */ + private List actions; + + /** + * Creates an instance of ScopeMapPropertiesUpdateParameters class. + */ + public ScopeMapPropertiesUpdateParameters() { + } + + /** + * Get the description property: The user friendly description of the scope map. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The user friendly description of the scope map. + * + * @param description the description value to set. + * @return the ScopeMapPropertiesUpdateParameters object itself. + */ + public ScopeMapPropertiesUpdateParameters withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actions property: The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * + * @param actions the actions value to set. + * @return the ScopeMapPropertiesUpdateParameters object itself. + */ + public ScopeMapPropertiesUpdateParameters withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopeMapPropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopeMapPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ScopeMapPropertiesUpdateParameters. + */ + public static ScopeMapPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopeMapPropertiesUpdateParameters deserializedScopeMapPropertiesUpdateParameters + = new ScopeMapPropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedScopeMapPropertiesUpdateParameters.description = reader.getString(); + } else if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedScopeMapPropertiesUpdateParameters.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedScopeMapPropertiesUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java new file mode 100644 index 000000000000..62bdb56e36aa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; +import java.io.IOException; + +/** + * An object that represents a token for a container registry. + */ +@Fluent +public final class TokenInner extends ProxyResource { + /* + * The properties of the token. + */ + private TokenProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TokenInner class. + */ + public TokenInner() { + } + + /** + * Get the properties property: The properties of the token. + * + * @return the properties value. + */ + public TokenProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the token. + * + * @param properties the properties value to set. + * @return the TokenInner object itself. + */ + public TokenInner withProperties(TokenProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TokenInner. + */ + public static TokenInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenInner deserializedTokenInner = new TokenInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTokenInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTokenInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTokenInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTokenInner.properties = TokenProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTokenInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java new file mode 100644 index 000000000000..96db882524a5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; +import java.io.IOException; + +/** + * The parameters for updating token properties. + */ +@Fluent +public final class TokenUpdateProperties implements JsonSerializable { + /* + * The resource ID of the scope map to which the token will be associated with. + */ + private String scopeMapId; + + /* + * The status of the token example enabled or disabled. + */ + private TokenStatus status; + + /* + * The credentials that can be used for authenticating the token. + */ + private TokenCredentialsProperties credentials; + + /** + * Creates an instance of TokenUpdateProperties class. + */ + public TokenUpdateProperties() { + } + + /** + * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @return the scopeMapId value. + */ + public String scopeMapId() { + return this.scopeMapId; + } + + /** + * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @param scopeMapId the scopeMapId value to set. + * @return the TokenUpdateProperties object itself. + */ + public TokenUpdateProperties withScopeMapId(String scopeMapId) { + this.scopeMapId = scopeMapId; + return this; + } + + /** + * Get the status property: The status of the token example enabled or disabled. + * + * @return the status value. + */ + public TokenStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the token example enabled or disabled. + * + * @param status the status value to set. + * @return the TokenUpdateProperties object itself. + */ + public TokenUpdateProperties withStatus(TokenStatus status) { + this.status = status; + return this; + } + + /** + * Get the credentials property: The credentials that can be used for authenticating the token. + * + * @return the credentials value. + */ + public TokenCredentialsProperties credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials that can be used for authenticating the token. + * + * @param credentials the credentials value to set. + * @return the TokenUpdateProperties object itself. + */ + public TokenUpdateProperties withCredentials(TokenCredentialsProperties credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scopeMapId", this.scopeMapId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("credentials", this.credentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenUpdateProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenUpdateProperties. + */ + public static TokenUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenUpdateProperties deserializedTokenUpdateProperties = new TokenUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scopeMapId".equals(fieldName)) { + deserializedTokenUpdateProperties.scopeMapId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedTokenUpdateProperties.status = TokenStatus.fromString(reader.getString()); + } else if ("credentials".equals(fieldName)) { + deserializedTokenUpdateProperties.credentials = TokenCredentialsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java new file mode 100644 index 000000000000..acafeea1bcc2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; +import java.io.IOException; +import java.util.Map; + +/** + * An object that represents a webhook for a container registry. + */ +@Immutable +public final class WebhookInner extends Resource { + /* + * The properties of the webhook. + */ + private WebhookProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WebhookInner class. + */ + private WebhookInner() { + } + + /** + * Get the properties property: The properties of the webhook. + * + * @return the properties value. + */ + public WebhookProperties properties() { + return this.properties; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebhookInner. + */ + public static WebhookInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookInner deserializedWebhookInner = new WebhookInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWebhookInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWebhookInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWebhookInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedWebhookInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWebhookInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedWebhookInner.properties = WebhookProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWebhookInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java new file mode 100644 index 000000000000..6cca061685c2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The parameters for creating the properties of a webhook. + */ +@Fluent +public final class WebhookPropertiesCreateParameters implements JsonSerializable { + /* + * The service URI for the webhook to post notifications. + */ + private String serviceUri; + + /* + * Custom headers that will be added to the webhook notifications. + */ + private Map customHeaders; + + /* + * The status of the webhook at the time the operation was called. + */ + private WebhookStatus status; + + /* + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all + * events. + */ + private String scope; + + /* + * The list of actions that trigger the webhook to post notifications. + */ + private List actions; + + /** + * Creates an instance of WebhookPropertiesCreateParameters class. + */ + public WebhookPropertiesCreateParameters() { + } + + /** + * Get the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set the serviceUri property: The service URI for the webhook to post notifications. + * + * @param serviceUri the serviceUri value to set. + * @return the WebhookPropertiesCreateParameters object itself. + */ + public WebhookPropertiesCreateParameters withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + + /** + * Get the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + public Map customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @param customHeaders the customHeaders value to set. + * @return the WebhookPropertiesCreateParameters object itself. + */ + public WebhookPropertiesCreateParameters withCustomHeaders(Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the status property: The status of the webhook at the time the operation was called. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the webhook at the time the operation was called. + * + * @param status the status value to set. + * @return the WebhookPropertiesCreateParameters object itself. + */ + public WebhookPropertiesCreateParameters withStatus(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @param scope the scope value to set. + * @return the WebhookPropertiesCreateParameters object itself. + */ + public WebhookPropertiesCreateParameters withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the actions property: The list of actions that trigger the webhook to post notifications. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The list of actions that trigger the webhook to post notifications. + * + * @param actions the actions value to set. + * @return the WebhookPropertiesCreateParameters object itself. + */ + public WebhookPropertiesCreateParameters withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceUri", this.serviceUri); + jsonWriter.writeArrayField("actions", this.actions, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("scope", this.scope); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookPropertiesCreateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookPropertiesCreateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebhookPropertiesCreateParameters. + */ + public static WebhookPropertiesCreateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookPropertiesCreateParameters deserializedWebhookPropertiesCreateParameters + = new WebhookPropertiesCreateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceUri".equals(fieldName)) { + deserializedWebhookPropertiesCreateParameters.serviceUri = reader.getString(); + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); + deserializedWebhookPropertiesCreateParameters.actions = actions; + } else if ("customHeaders".equals(fieldName)) { + Map customHeaders = reader.readMap(reader1 -> reader1.getString()); + deserializedWebhookPropertiesCreateParameters.customHeaders = customHeaders; + } else if ("status".equals(fieldName)) { + deserializedWebhookPropertiesCreateParameters.status = WebhookStatus.fromString(reader.getString()); + } else if ("scope".equals(fieldName)) { + deserializedWebhookPropertiesCreateParameters.scope = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookPropertiesCreateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java new file mode 100644 index 000000000000..0c1f88aabff3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The parameters for updating the properties of a webhook. + */ +@Fluent +public final class WebhookPropertiesUpdateParameters implements JsonSerializable { + /* + * The service URI for the webhook to post notifications. + */ + private String serviceUri; + + /* + * Custom headers that will be added to the webhook notifications. + */ + private Map customHeaders; + + /* + * The status of the webhook at the time the operation was called. + */ + private WebhookStatus status; + + /* + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all + * events. + */ + private String scope; + + /* + * The list of actions that trigger the webhook to post notifications. + */ + private List actions; + + /** + * Creates an instance of WebhookPropertiesUpdateParameters class. + */ + public WebhookPropertiesUpdateParameters() { + } + + /** + * Get the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set the serviceUri property: The service URI for the webhook to post notifications. + * + * @param serviceUri the serviceUri value to set. + * @return the WebhookPropertiesUpdateParameters object itself. + */ + public WebhookPropertiesUpdateParameters withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + + /** + * Get the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + public Map customHeaders() { + return this.customHeaders; + } + + /** + * Set the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @param customHeaders the customHeaders value to set. + * @return the WebhookPropertiesUpdateParameters object itself. + */ + public WebhookPropertiesUpdateParameters withCustomHeaders(Map customHeaders) { + this.customHeaders = customHeaders; + return this; + } + + /** + * Get the status property: The status of the webhook at the time the operation was called. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the webhook at the time the operation was called. + * + * @param status the status value to set. + * @return the WebhookPropertiesUpdateParameters object itself. + */ + public WebhookPropertiesUpdateParameters withStatus(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @param scope the scope value to set. + * @return the WebhookPropertiesUpdateParameters object itself. + */ + public WebhookPropertiesUpdateParameters withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the actions property: The list of actions that trigger the webhook to post notifications. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The list of actions that trigger the webhook to post notifications. + * + * @param actions the actions value to set. + * @return the WebhookPropertiesUpdateParameters object itself. + */ + public WebhookPropertiesUpdateParameters withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceUri", this.serviceUri); + jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("scope", this.scope); + jsonWriter.writeArrayField("actions", this.actions, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookPropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the WebhookPropertiesUpdateParameters. + */ + public static WebhookPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookPropertiesUpdateParameters deserializedWebhookPropertiesUpdateParameters + = new WebhookPropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceUri".equals(fieldName)) { + deserializedWebhookPropertiesUpdateParameters.serviceUri = reader.getString(); + } else if ("customHeaders".equals(fieldName)) { + Map customHeaders = reader.readMap(reader1 -> reader1.getString()); + deserializedWebhookPropertiesUpdateParameters.customHeaders = customHeaders; + } else if ("status".equals(fieldName)) { + deserializedWebhookPropertiesUpdateParameters.status = WebhookStatus.fromString(reader.getString()); + } else if ("scope".equals(fieldName)) { + deserializedWebhookPropertiesUpdateParameters.scope = reader.getString(); + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); + deserializedWebhookPropertiesUpdateParameters.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookPropertiesUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java new file mode 100644 index 000000000000..62d249717174 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the inner data models for ContainerRegistry. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +package com.azure.resourcemanager.containerregistry.generated.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java new file mode 100644 index 000000000000..ff6059c746ce --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the service clients for ContainerRegistry. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +package com.azure.resourcemanager.containerregistry.generated.fluent; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java new file mode 100644 index 000000000000..58c89406b446 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; + +public final class CacheRuleImpl implements CacheRule, CacheRule.Definition, CacheRule.Update { + private CacheRuleInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CacheRuleProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CacheRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String cacheRuleName; + + private CacheRuleUpdateParameters updateCacheRuleUpdateParameters; + + public CacheRuleImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public CacheRule create() { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .create(resourceGroupName, registryName, cacheRuleName, this.innerModel(), Context.NONE); + return this; + } + + public CacheRule create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .create(resourceGroupName, registryName, cacheRuleName, this.innerModel(), context); + return this; + } + + CacheRuleImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new CacheRuleInner(); + this.serviceManager = serviceManager; + this.cacheRuleName = name; + } + + public CacheRuleImpl update() { + this.updateCacheRuleUpdateParameters = new CacheRuleUpdateParameters(); + return this; + } + + public CacheRule apply() { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .update(resourceGroupName, registryName, cacheRuleName, updateCacheRuleUpdateParameters, Context.NONE); + return this; + } + + public CacheRule apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .update(resourceGroupName, registryName, cacheRuleName, updateCacheRuleUpdateParameters, context); + return this; + } + + CacheRuleImpl(CacheRuleInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.cacheRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cacheRules"); + } + + public CacheRule refresh() { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE) + .getValue(); + return this; + } + + public CacheRule refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCacheRules() + .getWithResponse(resourceGroupName, registryName, cacheRuleName, context) + .getValue(); + return this; + } + + public CacheRuleImpl withProperties(CacheRuleProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CacheRuleImpl withCredentialSetResourceId(String credentialSetResourceId) { + this.updateCacheRuleUpdateParameters.withCredentialSetResourceId(credentialSetResourceId); + return this; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java new file mode 100644 index 000000000000..f73d9a29ebe9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java @@ -0,0 +1,980 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.CacheRulesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; +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 CacheRulesClient. + */ +public final class CacheRulesClientImpl implements CacheRulesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CacheRulesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of CacheRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CacheRulesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(CacheRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientCacheRules to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientCacheRules") + public interface CacheRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheRuleInner cacheRuleCreateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified cache rule resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, accept, context); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified cache rule resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String cacheRuleName) { + return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, + Context context) { + return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context).block(); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified cache rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName) { + return getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE).getValue(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, + cacheRuleCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleCreateParameters, context); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginCreateAsync(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CacheRuleInner.class, CacheRuleInner.class, this.client.getContext()); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginCreateAsync(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, + cacheRuleCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CacheRuleInner.class, CacheRuleInner.class, context); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters) { + return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters).block(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context).block(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, + cacheRuleUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleUpdateParameters, context); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginUpdateAsync(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CacheRuleInner.class, CacheRuleInner.class, this.client.getContext()); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginUpdateAsync(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, + cacheRuleUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CacheRuleInner.class, CacheRuleInner.class, context); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, + String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + return this.beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters).block(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @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 an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context).block(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String cacheRuleName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 registryName, + String cacheRuleName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, context); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String cacheRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String cacheRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String cacheRuleName) { + return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName).getSyncPoller(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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> beginDelete(String resourceGroupName, String registryName, + String cacheRuleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context).getSyncPoller(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String cacheRuleName) { + return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 deleteAsync(String resourceGroupName, String registryName, String cacheRuleName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String cacheRuleName) { + deleteAsync(resourceGroupName, registryName, cacheRuleName).block(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context) { + deleteAsync(resourceGroupName, registryName, cacheRuleName, context).block(); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java new file mode 100644 index 000000000000..b8e5b8f5edb8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.CacheRulesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; +import com.azure.resourcemanager.containerregistry.generated.models.CacheRules; + +public final class CacheRulesImpl implements CacheRules { + private static final ClientLogger LOGGER = new ClientLogger(CacheRulesImpl.class); + + private final CacheRulesClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public CacheRulesImpl(CacheRulesClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, cacheRuleName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CacheRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CacheRule get(String resourceGroupName, String registryName, String cacheRuleName) { + CacheRuleInner inner = this.serviceClient().get(resourceGroupName, registryName, cacheRuleName); + if (inner != null) { + return new CacheRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String cacheRuleName) { + this.serviceClient().delete(resourceGroupName, registryName, cacheRuleName); + } + + public void delete(String resourceGroupName, String registryName, String cacheRuleName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, cacheRuleName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheRuleImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheRuleImpl(inner1, this.manager())); + } + + public CacheRule getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); + if (cacheRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); + if (cacheRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, cacheRuleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); + if (cacheRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); + } + this.delete(resourceGroupName, registryName, cacheRuleName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); + if (cacheRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); + } + this.delete(resourceGroupName, registryName, cacheRuleName, context); + } + + private CacheRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public CacheRuleImpl define(String name) { + return new CacheRuleImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java new file mode 100644 index 000000000000..f8329ee7d8cc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; +import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; +import java.util.Collections; +import java.util.Map; + +public final class CallbackConfigImpl implements CallbackConfig { + private CallbackConfigInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + CallbackConfigImpl(CallbackConfigInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String serviceUri() { + return this.innerModel().serviceUri(); + } + + public Map customHeaders() { + Map inner = this.innerModel().customHeaders(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public CallbackConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java new file mode 100644 index 000000000000..26a016d11ba5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java @@ -0,0 +1,1248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ConnectedRegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; +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 ConnectedRegistriesClient. + */ +public final class ConnectedRegistriesClientImpl implements ConnectedRegistriesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectedRegistriesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ConnectedRegistriesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectedRegistriesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = RestProxy.create(ConnectedRegistriesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientConnectedRegistries to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientConnectedRegistries") + public interface ConnectedRegistriesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("connectedRegistryName") String connectedRegistryName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("connectedRegistryName") String connectedRegistryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConnectedRegistryInner connectedRegistryCreateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("connectedRegistryName") String connectedRegistryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("connectedRegistryName") String connectedRegistryName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deactivate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("connectedRegistryName") String connectedRegistryName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the connected registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, accept, context); + } + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the connected registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + return getWithResponseAsync(resourceGroupName, registryName, connectedRegistryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); + } + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the connected registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner get(String resourceGroupName, String registryName, String connectedRegistryName) { + return getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE).getValue(); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, + accept, connectedRegistryCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, contentType, accept, + connectedRegistryCreateParameters, context); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedRegistryInner> beginCreateAsync( + String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + connectedRegistryName, connectedRegistryCreateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, + this.client.getContext()); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedRegistryInner> beginCreateAsync( + String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + connectedRegistryName, connectedRegistryCreateParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, context); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, + String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { + return this + .beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, + String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, + Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, + context) + .getSyncPoller(); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, + connectedRegistryCreateParameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, + connectedRegistryCreateParameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters) { + return createAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters) + .block(); + } + + /** + * Creates a connected registry for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, + context).block(); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, + accept, connectedRegistryUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, contentType, accept, + connectedRegistryUpdateParameters, context); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedRegistryInner> beginUpdateAsync( + String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, + connectedRegistryName, connectedRegistryUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, + this.client.getContext()); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedRegistryInner> beginUpdateAsync( + String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, + connectedRegistryName, connectedRegistryUpdateParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, context); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, + String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, + String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { + return this + .beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, + context) + .getSyncPoller(); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, + connectedRegistryUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, + Context context) { + return beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, + connectedRegistryUpdateParameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { + return updateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters) + .block(); + } + + /** + * Updates a connected registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, + ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, + context).block(); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String connectedRegistryName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 registryName, + String connectedRegistryName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, context); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, connectedRegistryName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String connectedRegistryName) { + return this.beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName).getSyncPoller(); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDelete(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName, context).getSyncPoller(); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String connectedRegistryName) { + return beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deleteAsync(String resourceGroupName, String registryName, String connectedRegistryName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String connectedRegistryName) { + deleteAsync(resourceGroupName, registryName, connectedRegistryName).block(); + } + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context) { + deleteAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String filter) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, filter, 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())); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String filter, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String filter, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String filter = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter, context)); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> deactivateWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + return FluxUtil + .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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>> deactivateWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + context = this.client.mergeContext(context); + return service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeactivateAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + Mono>> mono + = deactivateWithResponseAsync(resourceGroupName, registryName, connectedRegistryName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDeactivateAsync(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deactivateWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeactivate(String resourceGroupName, String registryName, + String connectedRegistryName) { + return this.beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName).getSyncPoller(); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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> beginDeactivate(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + return this.beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName, context) + .getSyncPoller(); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deactivateAsync(String resourceGroupName, String registryName, String connectedRegistryName) { + return beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivateAsync(String resourceGroupName, String registryName, String connectedRegistryName, + Context context) { + return beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName) { + deactivateAsync(resourceGroupName, registryName, connectedRegistryName).block(); + } + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, + Context context) { + deactivateAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java new file mode 100644 index 000000000000..fda25fc724bf --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ConnectedRegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistries; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; + +public final class ConnectedRegistriesImpl implements ConnectedRegistries { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedRegistriesImpl.class); + + private final ConnectedRegistriesClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public ConnectedRegistriesImpl(ConnectedRegistriesClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, connectedRegistryName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ConnectedRegistryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectedRegistry get(String resourceGroupName, String registryName, String connectedRegistryName) { + ConnectedRegistryInner inner = this.serviceClient().get(resourceGroupName, registryName, connectedRegistryName); + if (inner != null) { + return new ConnectedRegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String connectedRegistryName) { + this.serviceClient().delete(resourceGroupName, registryName, connectedRegistryName); + } + + public void delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, connectedRegistryName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedRegistryImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedRegistryImpl(inner1, this.manager())); + } + + public void deactivate(String resourceGroupName, String registryName, String connectedRegistryName) { + this.serviceClient().deactivate(resourceGroupName, registryName, connectedRegistryName); + } + + public void deactivate(String resourceGroupName, String registryName, String connectedRegistryName, + Context context) { + this.serviceClient().deactivate(resourceGroupName, registryName, connectedRegistryName, context); + } + + public ConnectedRegistry getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); + if (connectedRegistryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); + if (connectedRegistryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, connectedRegistryName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); + if (connectedRegistryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); + } + this.delete(resourceGroupName, registryName, connectedRegistryName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); + if (connectedRegistryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); + } + this.delete(resourceGroupName, registryName, connectedRegistryName, context); + } + + private ConnectedRegistriesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public ConnectedRegistryImpl define(String name) { + return new ConnectedRegistryImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java new file mode 100644 index 000000000000..a37a45523fca --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; +import java.util.List; + +public final class ConnectedRegistryImpl + implements ConnectedRegistry, ConnectedRegistry.Definition, ConnectedRegistry.Update { + private ConnectedRegistryInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ConnectedRegistryProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ConnectedRegistryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String connectedRegistryName; + + private ConnectedRegistryUpdateParameters updateConnectedRegistryUpdateParameters; + + public ConnectedRegistryImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public ConnectedRegistry create() { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .create(resourceGroupName, registryName, connectedRegistryName, this.innerModel(), Context.NONE); + return this; + } + + public ConnectedRegistry create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .create(resourceGroupName, registryName, connectedRegistryName, this.innerModel(), context); + return this; + } + + ConnectedRegistryImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new ConnectedRegistryInner(); + this.serviceManager = serviceManager; + this.connectedRegistryName = name; + } + + public ConnectedRegistryImpl update() { + this.updateConnectedRegistryUpdateParameters = new ConnectedRegistryUpdateParameters(); + return this; + } + + public ConnectedRegistry apply() { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .update(resourceGroupName, registryName, connectedRegistryName, updateConnectedRegistryUpdateParameters, + Context.NONE); + return this; + } + + public ConnectedRegistry apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .update(resourceGroupName, registryName, connectedRegistryName, updateConnectedRegistryUpdateParameters, + context); + return this; + } + + ConnectedRegistryImpl(ConnectedRegistryInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedRegistries"); + } + + public ConnectedRegistry refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE) + .getValue(); + return this; + } + + public ConnectedRegistry refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectedRegistries() + .getWithResponse(resourceGroupName, registryName, connectedRegistryName, context) + .getValue(); + return this; + } + + public void deactivate() { + serviceManager.connectedRegistries().deactivate(resourceGroupName, registryName, connectedRegistryName); + } + + public void deactivate(Context context) { + serviceManager.connectedRegistries() + .deactivate(resourceGroupName, registryName, connectedRegistryName, context); + } + + public ConnectedRegistryImpl withProperties(ConnectedRegistryProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ConnectedRegistryImpl withSyncProperties(SyncUpdateProperties syncProperties) { + this.updateConnectedRegistryUpdateParameters.withSyncProperties(syncProperties); + return this; + } + + public ConnectedRegistryImpl withLogging(LoggingProperties logging) { + this.updateConnectedRegistryUpdateParameters.withLogging(logging); + return this; + } + + public ConnectedRegistryImpl withClientTokenIds(List clientTokenIds) { + this.updateConnectedRegistryUpdateParameters.withClientTokenIds(clientTokenIds); + return this; + } + + public ConnectedRegistryImpl withNotificationsList(List notificationsList) { + this.updateConnectedRegistryUpdateParameters.withNotificationsList(notificationsList); + return this; + } + + public ConnectedRegistryImpl withGarbageCollection(GarbageCollectionProperties garbageCollection) { + this.updateConnectedRegistryUpdateParameters.withGarbageCollection(garbageCollection); + return this; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java new file mode 100644 index 000000000000..038f28d07eac --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the ContainerRegistryManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ContainerRegistryManagementClientImpl.class }) +public final class ContainerRegistryManagementClientBuilder { + /* + * Service host + */ + private String endpoint; + + /** + * Sets Service host. + * + * @param endpoint the endpoint value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ContainerRegistryManagementClientBuilder. + */ + public ContainerRegistryManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of ContainerRegistryManagementClientImpl with the provided parameters. + * + * @return an instance of ContainerRegistryManagementClientImpl. + */ + public ContainerRegistryManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerRegistryManagementClientImpl client = new ContainerRegistryManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + return client; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java new file mode 100644 index 000000000000..09a30d73f504 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the ContainerRegistryManagementClientImpl type. + */ +@ServiceClient(builder = ContainerRegistryManagementClientBuilder.class) +public final class ContainerRegistryManagementClientImpl implements ContainerRegistryManagementClient { + /** + * Service host. + */ + private final String endpoint; + + /** + * Gets Service host. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Version parameter. + */ + private final String apiVersion; + + /** + * Gets Version parameter. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The RegistriesClient object to access its operations. + */ + private final RegistriesClient registries; + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + public RegistriesClient getRegistries() { + return this.registries; + } + + /** + * The CacheRulesClient object to access its operations. + */ + private final CacheRulesClient cacheRules; + + /** + * Gets the CacheRulesClient object to access its operations. + * + * @return the CacheRulesClient object. + */ + public CacheRulesClient getCacheRules() { + return this.cacheRules; + } + + /** + * The CredentialSetsClient object to access its operations. + */ + private final CredentialSetsClient credentialSets; + + /** + * Gets the CredentialSetsClient object to access its operations. + * + * @return the CredentialSetsClient object. + */ + public CredentialSetsClient getCredentialSets() { + return this.credentialSets; + } + + /** + * The ConnectedRegistriesClient object to access its operations. + */ + private final ConnectedRegistriesClient connectedRegistries; + + /** + * Gets the ConnectedRegistriesClient object to access its operations. + * + * @return the ConnectedRegistriesClient object. + */ + public ConnectedRegistriesClient getConnectedRegistries() { + return this.connectedRegistries; + } + + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The ReplicationsClient object to access its operations. + */ + private final ReplicationsClient replications; + + /** + * Gets the ReplicationsClient object to access its operations. + * + * @return the ReplicationsClient object. + */ + public ReplicationsClient getReplications() { + return this.replications; + } + + /** + * The ScopeMapsClient object to access its operations. + */ + private final ScopeMapsClient scopeMaps; + + /** + * Gets the ScopeMapsClient object to access its operations. + * + * @return the ScopeMapsClient object. + */ + public ScopeMapsClient getScopeMaps() { + return this.scopeMaps; + } + + /** + * The TokensClient object to access its operations. + */ + private final TokensClient tokens; + + /** + * Gets the TokensClient object to access its operations. + * + * @return the TokensClient object. + */ + public TokensClient getTokens() { + return this.tokens; + } + + /** + * The WebhooksClient object to access its operations. + */ + private final WebhooksClient webhooks; + + /** + * Gets the WebhooksClient object to access its operations. + * + * @return the WebhooksClient object. + */ + public WebhooksClient getWebhooks() { + return this.webhooks; + } + + /** + * Initializes an instance of ContainerRegistryManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @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 endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + */ + ContainerRegistryManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.endpoint = endpoint; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-11-01"; + this.operations = new OperationsClientImpl(this); + this.registries = new RegistriesClientImpl(this); + this.cacheRules = new CacheRulesClientImpl(this); + this.credentialSets = new CredentialSetsClientImpl(this); + this.connectedRegistries = new ConnectedRegistriesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.replications = new ReplicationsClientImpl(this); + this.scopeMaps = new ScopeMapsClientImpl(this); + this.tokens = new TokensClientImpl(this); + this.webhooks = new WebhooksClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(HttpHeaderName.fromString(s)); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryManagementClientImpl.class); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java new file mode 100644 index 000000000000..d24432715499 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import java.util.List; + +public final class CredentialSetImpl implements CredentialSet, CredentialSet.Definition, CredentialSet.Update { + private CredentialSetInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CredentialSetProperties properties() { + return this.innerModel().properties(); + } + + public IdentityProperties identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CredentialSetInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String credentialSetName; + + private CredentialSetUpdateParameters updateCredentialSetUpdateParameters; + + public CredentialSetImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public CredentialSet create() { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .create(resourceGroupName, registryName, credentialSetName, this.innerModel(), Context.NONE); + return this; + } + + public CredentialSet create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .create(resourceGroupName, registryName, credentialSetName, this.innerModel(), context); + return this; + } + + CredentialSetImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new CredentialSetInner(); + this.serviceManager = serviceManager; + this.credentialSetName = name; + } + + public CredentialSetImpl update() { + this.updateCredentialSetUpdateParameters = new CredentialSetUpdateParameters(); + return this; + } + + public CredentialSet apply() { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .update(resourceGroupName, registryName, credentialSetName, updateCredentialSetUpdateParameters, + Context.NONE); + return this; + } + + public CredentialSet apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .update(resourceGroupName, registryName, credentialSetName, updateCredentialSetUpdateParameters, context); + return this; + } + + CredentialSetImpl(CredentialSetInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.credentialSetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "credentialSets"); + } + + public CredentialSet refresh() { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE) + .getValue(); + return this; + } + + public CredentialSet refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCredentialSets() + .getWithResponse(resourceGroupName, registryName, credentialSetName, context) + .getValue(); + return this; + } + + public CredentialSetImpl withProperties(CredentialSetProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CredentialSetImpl withIdentity(IdentityProperties identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateCredentialSetUpdateParameters.withIdentity(identity); + return this; + } + } + + public CredentialSetImpl withAuthCredentials(List authCredentials) { + this.updateCredentialSetUpdateParameters.withAuthCredentials(authCredentials); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java new file mode 100644 index 000000000000..cdbb9e7ac01c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java @@ -0,0 +1,1005 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.CredentialSetsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; +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 CredentialSetsClient. + */ +public final class CredentialSetsClientImpl implements CredentialSetsClient { + /** + * The proxy service used to perform REST calls. + */ + private final CredentialSetsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of CredentialSetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CredentialSetsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(CredentialSetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientCredentialSets to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientCredentialSets") + public interface CredentialSetsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CredentialSetInner credentialSetCreateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified credential set resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, accept, context); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified credential set resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String credentialSetName) { + return getWithResponseAsync(resourceGroupName, registryName, credentialSetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String credentialSetName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, credentialSetName, context).block(); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified credential set resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName) { + return getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE).getValue(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetInner credentialSetCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, + accept, credentialSetCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetInner credentialSetCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetCreateParameters, + context); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginCreateAsync(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + credentialSetName, credentialSetCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CredentialSetInner.class, CredentialSetInner.class, this.client.getContext()); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginCreateAsync(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + credentialSetName, credentialSetCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CredentialSetInner.class, CredentialSetInner.class, context); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, + Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, + context) + .getSyncPoller(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetInner credentialSetCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetInner credentialSetCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters).block(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetInner credentialSetCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context) + .block(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, + accept, credentialSetUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetUpdateParameters, + context); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginUpdateAsync(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, + credentialSetName, credentialSetUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CredentialSetInner.class, CredentialSetInner.class, this.client.getContext()); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginUpdateAsync(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, + credentialSetName, credentialSetUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CredentialSetInner.class, CredentialSetInner.class, context); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, + String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, + context) + .getSyncPoller(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters).block(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @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 an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context) + .block(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String credentialSetName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 registryName, + String credentialSetName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, context); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String credentialSetName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String credentialSetName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String credentialSetName) { + return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName).getSyncPoller(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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> beginDelete(String resourceGroupName, String registryName, + String credentialSetName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context).getSyncPoller(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String credentialSetName) { + return beginDeleteAsync(resourceGroupName, registryName, credentialSetName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 deleteAsync(String resourceGroupName, String registryName, String credentialSetName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String credentialSetName) { + deleteAsync(resourceGroupName, registryName, credentialSetName).block(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context) { + deleteAsync(resourceGroupName, registryName, credentialSetName, context).block(); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java new file mode 100644 index 000000000000..0e62f50010f2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.CredentialSetsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSets; + +public final class CredentialSetsImpl implements CredentialSets { + private static final ClientLogger LOGGER = new ClientLogger(CredentialSetsImpl.class); + + private final CredentialSetsClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public CredentialSetsImpl(CredentialSetsClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, + String credentialSetName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, credentialSetName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CredentialSetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialSet get(String resourceGroupName, String registryName, String credentialSetName) { + CredentialSetInner inner = this.serviceClient().get(resourceGroupName, registryName, credentialSetName); + if (inner != null) { + return new CredentialSetImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String credentialSetName) { + this.serviceClient().delete(resourceGroupName, registryName, credentialSetName); + } + + public void delete(String resourceGroupName, String registryName, String credentialSetName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, credentialSetName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CredentialSetImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CredentialSetImpl(inner1, this.manager())); + } + + public CredentialSet getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); + if (credentialSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); + if (credentialSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, credentialSetName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); + if (credentialSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); + } + this.delete(resourceGroupName, registryName, credentialSetName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); + if (credentialSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); + } + this.delete(resourceGroupName, registryName, credentialSetName, context); + } + + private CredentialSetsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public CredentialSetImpl define(String name) { + return new CredentialSetImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java new file mode 100644 index 000000000000..a06a8455c3b9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; +import com.azure.resourcemanager.containerregistry.generated.models.Event; +import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; +import com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage; + +public final class EventImpl implements Event { + private EventInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + EventImpl(EventInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public EventRequestMessage eventRequestMessage() { + return this.innerModel().eventRequestMessage(); + } + + public EventResponseMessage eventResponseMessage() { + return this.innerModel().eventResponseMessage(); + } + + public EventInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java new file mode 100644 index 000000000000..76a54a1a21d0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; +import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; + +public final class EventInfoImpl implements EventInfo { + private EventInfoInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + EventInfoImpl(EventInfoInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public EventInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java new file mode 100644 index 000000000000..c2f46f4bfe22 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; +import java.util.Collections; +import java.util.List; + +public final class GenerateCredentialsResultImpl implements GenerateCredentialsResult { + private GenerateCredentialsResultInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + GenerateCredentialsResultImpl(GenerateCredentialsResultInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String username() { + return this.innerModel().username(); + } + + public List passwords() { + List inner = this.innerModel().passwords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public GenerateCredentialsResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java new file mode 100644 index 000000000000..45b1a3c8b873 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; +import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; + +public final class OperationDefinitionImpl implements OperationDefinition { + private OperationDefinitionInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + OperationDefinitionImpl(OperationDefinitionInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String origin() { + return this.innerModel().origin(); + } + + public String name() { + return this.innerModel().name(); + } + + public OperationDisplayDefinition display() { + return this.innerModel().display(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationServiceSpecificationDefinition serviceSpecification() { + return this.innerModel().serviceSpecification(); + } + + public OperationDefinitionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..95d4e4b01755 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +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.PathParam; +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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientOperations") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.ContainerRegistry/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the operations for the provider. + * + * @throws 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 result of a request to list container registry operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), 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 the operations for the provider. + * + * @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 result of a request to list container registry operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the operations for the provider. + * + * @throws 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 result of a request to list container registry operations as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the operations for the provider. + * + * @throws 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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list container registry operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list container registry operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java new file mode 100644 index 000000000000..38496d282323 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; +import com.azure.resourcemanager.containerregistry.generated.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..7a808abe9140 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; + +public final class PrivateEndpointConnectionImpl + implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpointConnectionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String privateEndpointConnectionName; + + public PrivateEndpointConnectionImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public PrivateEndpointConnection create() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnection create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + } + + public PrivateEndpointConnectionImpl update() { + return this; + } + + public PrivateEndpointConnection apply() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnection apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public PrivateEndpointConnection refresh() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionImpl withProperties(PrivateEndpointConnectionProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..ccb6d663f2e6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,793 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.PathParam; +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.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult; +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 PrivateEndpointConnectionsClient. + */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateEndpointConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientPrivateEndpointConnections to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientPrivateEndpointConnections") + public interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified private endpoint connection associated with the container registry along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String registryName, String privateEndpointConnectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String registryName, String privateEndpointConnectionName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, privateEndpointConnectionName, accept, context); + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified private endpoint connection associated with the container registry on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).block(); + } + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified private endpoint connection associated with the container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String registryName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE).getValue(); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a private endpoint connection for a container registry along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a container registry along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, context); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, + privateEndpointConnectionName, privateEndpointConnection); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, + privateEndpointConnectionName, privateEndpointConnection, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + context); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection) + .getSyncPoller(); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a + * container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnection, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection, context) + .getSyncPoller(); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a private endpoint connection for a container registry on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a container registry on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a private endpoint connection for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { + return createOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection).block(); + } + + /** + * Update the state of specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnection The parameters for creating a private endpoint connection. + * @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 an object that represents a private endpoint connection for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection, context).block(); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String privateEndpointConnectionName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 registryName, + String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, privateEndpointConnectionName, context); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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> beginDelete(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 deleteAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).block(); + } + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, + Context context) { + deleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).block(); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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 private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..89825ff02ab4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get(String resourceGroupName, String registryName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, registryName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, registryName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, registryName, privateEndpointConnectionName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PrivateEndpointConnection getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, registryName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionImpl define(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..9ef5ac6bc82d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateLinkResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java new file mode 100644 index 000000000000..8d2d98df7ff1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java @@ -0,0 +1,2200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.RegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; +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 RegistriesClient. + */ +public final class RegistriesClientImpl implements RegistriesClient { + /** + * The proxy service used to perform REST calls. + */ + private final RegistriesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of RegistriesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistriesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientRegistries to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientRegistries") + public interface RegistriesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner registry, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryUpdateParameters registryUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> importImage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ImportImageParameters parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listUsages(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateCredential(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegenerateCredentialParameters regenerateCredentialParameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> generateCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GenerateCredentialsParameters generateCredentialsParameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryNameCheckRequest registryNameCheckRequest, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getPrivateLinkResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPrivateLinkResources(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPrivateLinkResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified container registry along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String registryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + } + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + RegistryInner registry) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, registry, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + RegistryInner registry, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, contentType, accept, registry, context); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, + String registryName, RegistryInner registry) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, registry); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, this.client.getContext()); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, + String registryName, RegistryInner registry, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, registry, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, context); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreate(String resourceGroupName, + String registryName, RegistryInner registry) { + return this.beginCreateAsync(resourceGroupName, registryName, registry).getSyncPoller(); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreate(String resourceGroupName, + String registryName, RegistryInner registry, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, registry, context).getSyncPoller(); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, RegistryInner registry) { + return beginCreateAsync(resourceGroupName, registryName, registry).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, RegistryInner registry, + Context context) { + return beginCreateAsync(resourceGroupName, registryName, registry, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry) { + return createAsync(resourceGroupName, registryName, registry).block(); + } + + /** + * Creates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry, + Context context) { + return createAsync(resourceGroupName, registryName, registry, context).block(); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + registryUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, contentType, accept, registryUpdateParameters, context); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginUpdateAsync(String resourceGroupName, + String registryName, RegistryUpdateParameters registryUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, registryUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, this.client.getContext()); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginUpdateAsync(String resourceGroupName, + String registryName, RegistryUpdateParameters registryUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, registryUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, context); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, + String registryName, RegistryUpdateParameters registryUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters).getSyncPoller(); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, + String registryName, RegistryUpdateParameters registryUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner update(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters) { + return updateAsync(resourceGroupName, registryName, registryUpdateParameters).block(); + } + + /** + * Updates a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registryUpdateParameters The parameters for updating a container registry. + * @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 an object that represents a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner update(String resourceGroupName, String registryName, + RegistryUpdateParameters registryUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, registryUpdateParameters, context).block(); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 registryName, + Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, context); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName) { + return this.beginDeleteAsync(resourceGroupName, registryName).getSyncPoller(); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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> beginDelete(String resourceGroupName, String registryName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, context).getSyncPoller(); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName) { + return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 deleteAsync(String resourceGroupName, String registryName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName) { + deleteAsync(resourceGroupName, registryName).block(); + } + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 delete(String resourceGroupName, String registryName, Context context) { + deleteAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @throws 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 result of a request to list container registries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @throws 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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> importImageWithResponseAsync(String resourceGroupName, String registryName, + ImportImageParameters parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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>> importImageWithResponseAsync(String resourceGroupName, String registryName, + ImportImageParameters parameters, Context context) { + final String contentType = "application/json"; + context = this.client.mergeContext(context); + return service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginImportImageAsync(String resourceGroupName, String registryName, + ImportImageParameters parameters) { + Mono>> mono + = importImageWithResponseAsync(resourceGroupName, registryName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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> beginImportImageAsync(String resourceGroupName, String registryName, + ImportImageParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = importImageWithResponseAsync(resourceGroupName, registryName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginImportImage(String resourceGroupName, String registryName, + ImportImageParameters parameters) { + return this.beginImportImageAsync(resourceGroupName, registryName, parameters).getSyncPoller(); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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> beginImportImage(String resourceGroupName, String registryName, + ImportImageParameters parameters, Context context) { + return this.beginImportImageAsync(resourceGroupName, registryName, parameters, context).getSyncPoller(); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 importImageAsync(String resourceGroupName, String registryName, + ImportImageParameters parameters) { + return beginImportImageAsync(resourceGroupName, registryName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters, + Context context) { + return beginImportImageAsync(resourceGroupName, registryName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { + importImageAsync(resourceGroupName, registryName, parameters).block(); + } + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, + Context context) { + importImageAsync(resourceGroupName, registryName, parameters, context).block(); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesWithResponseAsync(String resourceGroupName, + String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesWithResponseAsync(String resourceGroupName, + String registryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listUsagesAsync(String resourceGroupName, String registryName) { + return listUsagesWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context) { + return listUsagesWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { + return listUsagesWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listCredentialsWithResponseAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listCredentialsWithResponseAsync(String resourceGroupName, String registryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCredentialsAsync(String resourceGroupName, + String registryName) { + return listCredentialsWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 from the ListCredentials operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCredentialsWithResponse(String resourceGroupName, + String registryName, Context context) { + return listCredentialsWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName) { + return listCredentialsWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateCredentialWithResponseAsync( + String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + regenerateCredentialParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateCredentialWithResponseAsync( + String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + regenerateCredentialParameters, context); + } + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateCredentialAsync(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { + return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 from the ListCredentials operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { + return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters, + context).block(); + } + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters) { + return regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, + Context.NONE).getValue(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, + String registryName, GenerateCredentialsParameters generateCredentialsParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + generateCredentialsParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, + String registryName, GenerateCredentialsParameters generateCredentialsParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + generateCredentialsParameters, context); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, GenerateCredentialsResultInner> + beginGenerateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + Mono>> mono + = generateCredentialsWithResponseAsync(resourceGroupName, registryName, generateCredentialsParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, + this.client.getContext()); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> + beginGenerateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = generateCredentialsWithResponseAsync(resourceGroupName, registryName, + generateCredentialsParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, + context); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, GenerateCredentialsResultInner> + beginGenerateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return this.beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters) + .getSyncPoller(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> + beginGenerateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return this + .beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .getSyncPoller(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).block(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .block(); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to check the availability of a container registry name along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to check the availability of a container registry name on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest) { + return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { + return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest, context).block(); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to check the availability of a container registry name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { + return checkNameAvailabilityWithResponse(registryNameCheckRequest, Context.NONE).getValue(); + } + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourceWithResponseAsync(String resourceGroupName, + String registryName, String groupName) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourceWithResponseAsync(String resourceGroupName, + String registryName, String groupName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context); + } + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourceAsync(String resourceGroupName, String registryName, + String groupName) { + return getPrivateLinkResourceWithResponseAsync(resourceGroupName, registryName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourceWithResponse(String resourceGroupName, + String registryName, String groupName, Context context) { + return getPrivateLinkResourceWithResponseAsync(resourceGroupName, registryName, groupName, context).block(); + } + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, String registryName, + String groupName) { + return getPrivateLinkResourceWithResponse(resourceGroupName, registryName, groupName, Context.NONE).getValue(); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, + String registryName) { + return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName), + nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink)); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, + String registryName, Context context) { + return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateLinkResources(String resourceGroupName, + String registryName) { + return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName)); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateLinkResources(String resourceGroupName, + String registryName, Context context) { + return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(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. + * @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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPrivateLinkResourcesNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listPrivateLinkResourcesNext(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. + * @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 result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPrivateLinkResourcesNextSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listPrivateLinkResourcesNext(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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java new file mode 100644 index 000000000000..da1e309d3292 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java @@ -0,0 +1,313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.RegistriesClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; +import com.azure.resourcemanager.containerregistry.generated.models.Registries; +import com.azure.resourcemanager.containerregistry.generated.models.Registry; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; + +public final class RegistriesImpl implements Registries { + private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class); + + private final RegistriesClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public RegistriesImpl(RegistriesClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Registry getByResourceGroup(String resourceGroupName, String registryName) { + RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String registryName) { + this.serviceClient().delete(resourceGroupName, registryName); + } + + public void delete(String resourceGroupName, String registryName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { + this.serviceClient().importImage(resourceGroupName, registryName, parameters); + } + + public void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, + Context context) { + this.serviceClient().importImage(resourceGroupName, registryName, parameters, context); + } + + public Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context) { + Response inner + = this.serviceClient().listUsagesWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryUsageListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RegistryUsageListResult listUsages(String resourceGroupName, String registryName) { + RegistryUsageListResultInner inner = this.serviceClient().listUsages(resourceGroupName, registryName); + if (inner != null) { + return new RegistryUsageListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listCredentialsWithResponse(String resourceGroupName, + String registryName, Context context) { + Response inner + = this.serviceClient().listCredentialsWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryListCredentialsResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RegistryListCredentialsResult listCredentials(String resourceGroupName, String registryName) { + RegistryListCredentialsResultInner inner + = this.serviceClient().listCredentials(resourceGroupName, registryName); + if (inner != null) { + return new RegistryListCredentialsResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { + Response inner = this.serviceClient() + .regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryListCredentialsResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RegistryListCredentialsResult regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters) { + RegistryListCredentialsResultInner inner = this.serviceClient() + .regenerateCredential(resourceGroupName, registryName, regenerateCredentialParameters); + if (inner != null) { + return new RegistryListCredentialsResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + GenerateCredentialsResultInner inner + = this.serviceClient().generateCredentials(resourceGroupName, registryName, generateCredentialsParameters); + if (inner != null) { + return new GenerateCredentialsResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + GenerateCredentialsResultInner inner = this.serviceClient() + .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters, context); + if (inner != null) { + return new GenerateCredentialsResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response + checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(registryNameCheckRequest, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryNameStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RegistryNameStatus checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { + RegistryNameStatusInner inner = this.serviceClient().checkNameAvailability(registryNameCheckRequest); + if (inner != null) { + return new RegistryNameStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateLinkResourceWithResponse(String resourceGroupName, + String registryName, String groupName, Context context) { + Response inner = this.serviceClient() + .getPrivateLinkResourceWithResponse(resourceGroupName, registryName, groupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResource getPrivateLinkResource(String resourceGroupName, String registryName, String groupName) { + PrivateLinkResourceInner inner + = this.serviceClient().getPrivateLinkResource(resourceGroupName, registryName, groupName); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName) { + PagedIterable inner + = this.serviceClient().listPrivateLinkResources(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, + Context context) { + PagedIterable inner + = this.serviceClient().listPrivateLinkResources(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public Registry getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + this.delete(resourceGroupName, registryName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + this.delete(resourceGroupName, registryName, context); + } + + private RegistriesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public RegistryImpl define(String name) { + return new RegistryImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java new file mode 100644 index 000000000000..aec4397c0d29 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions; +import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; +import com.azure.resourcemanager.containerregistry.generated.models.Policies; +import com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; +import com.azure.resourcemanager.containerregistry.generated.models.Registry; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class RegistryImpl implements Registry, Registry.Definition, Registry.Update { + private RegistryInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 RegistryProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public IdentityProperties identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public RegistryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private RegistryUpdateParameters updateRegistryUpdateParameters; + + public RegistryImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Registry create() { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .create(resourceGroupName, registryName, this.innerModel(), Context.NONE); + return this; + } + + public Registry create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .create(resourceGroupName, registryName, this.innerModel(), context); + return this; + } + + RegistryImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new RegistryInner(); + this.serviceManager = serviceManager; + this.registryName = name; + } + + public RegistryImpl update() { + this.updateRegistryUpdateParameters = new RegistryUpdateParameters(); + return this; + } + + public Registry apply() { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .update(resourceGroupName, registryName, updateRegistryUpdateParameters, Context.NONE); + return this; + } + + public Registry apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .update(resourceGroupName, registryName, updateRegistryUpdateParameters, context); + return this; + } + + RegistryImpl(RegistryInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + } + + public Registry refresh() { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE) + .getValue(); + return this; + } + + public Registry refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, context) + .getValue(); + return this; + } + + public void importImage(ImportImageParameters parameters) { + serviceManager.registries().importImage(resourceGroupName, registryName, parameters); + } + + public void importImage(ImportImageParameters parameters, Context context) { + serviceManager.registries().importImage(resourceGroupName, registryName, parameters, context); + } + + public Response listCredentialsWithResponse(Context context) { + return serviceManager.registries().listCredentialsWithResponse(resourceGroupName, registryName, context); + } + + public RegistryListCredentialsResult listCredentials() { + return serviceManager.registries().listCredentials(resourceGroupName, registryName); + } + + public Response regenerateCredentialWithResponse( + RegenerateCredentialParameters regenerateCredentialParameters, Context context) { + return serviceManager.registries() + .regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, context); + } + + public RegistryListCredentialsResult + regenerateCredential(RegenerateCredentialParameters regenerateCredentialParameters) { + return serviceManager.registries() + .regenerateCredential(resourceGroupName, registryName, regenerateCredentialParameters); + } + + public GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters) { + return serviceManager.registries() + .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters); + } + + public GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters, + Context context) { + return serviceManager.registries() + .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters, context); + } + + public RegistryImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public RegistryImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public RegistryImpl withSku(Sku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateRegistryUpdateParameters.withSku(sku); + return this; + } + } + + public RegistryImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateRegistryUpdateParameters.withTags(tags); + return this; + } + } + + public RegistryImpl withProperties(RegistryProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public RegistryImpl withIdentity(IdentityProperties identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateRegistryUpdateParameters.withIdentity(identity); + return this; + } + } + + public RegistryImpl withAdminUserEnabled(Boolean adminUserEnabled) { + this.updateRegistryUpdateParameters.withAdminUserEnabled(adminUserEnabled); + return this; + } + + public RegistryImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.updateRegistryUpdateParameters.withNetworkRuleSet(networkRuleSet); + return this; + } + + public RegistryImpl withPolicies(Policies policies) { + this.updateRegistryUpdateParameters.withPolicies(policies); + return this; + } + + public RegistryImpl withEncryption(EncryptionProperty encryption) { + this.updateRegistryUpdateParameters.withEncryption(encryption); + return this; + } + + public RegistryImpl withDataEndpointEnabled(Boolean dataEndpointEnabled) { + this.updateRegistryUpdateParameters.withDataEndpointEnabled(dataEndpointEnabled); + return this; + } + + public RegistryImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.updateRegistryUpdateParameters.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + public RegistryImpl withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { + this.updateRegistryUpdateParameters.withNetworkRuleBypassOptions(networkRuleBypassOptions); + return this; + } + + public RegistryImpl withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { + this.updateRegistryUpdateParameters.withNetworkRuleBypassAllowedForTasks(networkRuleBypassAllowedForTasks); + return this; + } + + public RegistryImpl withAnonymousPullEnabled(Boolean anonymousPullEnabled) { + this.updateRegistryUpdateParameters.withAnonymousPullEnabled(anonymousPullEnabled); + return this; + } + + public RegistryImpl withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { + this.updateRegistryUpdateParameters.withRoleAssignmentMode(roleAssignmentMode); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java new file mode 100644 index 000000000000..e393fa686ce8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; +import java.util.Collections; +import java.util.List; + +public final class RegistryListCredentialsResultImpl implements RegistryListCredentialsResult { + private RegistryListCredentialsResultInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + RegistryListCredentialsResultImpl(RegistryListCredentialsResultInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String username() { + return this.innerModel().username(); + } + + public List passwords() { + List inner = this.innerModel().passwords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RegistryListCredentialsResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java new file mode 100644 index 000000000000..777e9a0d0ac6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; + +public final class RegistryNameStatusImpl implements RegistryNameStatus { + private RegistryNameStatusInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + RegistryNameStatusImpl(RegistryNameStatusInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean nameAvailable() { + return this.innerModel().nameAvailable(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public RegistryNameStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java new file mode 100644 index 000000000000..fb79818103b1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; +import java.util.Collections; +import java.util.List; + +public final class RegistryUsageListResultImpl implements RegistryUsageListResult { + private RegistryUsageListResultInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + RegistryUsageListResultImpl(RegistryUsageListResultInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RegistryUsageListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java new file mode 100644 index 000000000000..3c40b8689ce9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; +import java.util.Collections; +import java.util.Map; + +public final class ReplicationImpl implements Replication, Replication.Definition, Replication.Update { + private ReplicationInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 ReplicationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ReplicationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String replicationName; + + private ReplicationUpdateParameters updateReplicationUpdateParameters; + + public ReplicationImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public Replication create() { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .create(resourceGroupName, registryName, replicationName, this.innerModel(), Context.NONE); + return this; + } + + public Replication create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .create(resourceGroupName, registryName, replicationName, this.innerModel(), context); + return this; + } + + ReplicationImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new ReplicationInner(); + this.serviceManager = serviceManager; + this.replicationName = name; + } + + public ReplicationImpl update() { + this.updateReplicationUpdateParameters = new ReplicationUpdateParameters(); + return this; + } + + public Replication apply() { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .update(resourceGroupName, registryName, replicationName, updateReplicationUpdateParameters, Context.NONE); + return this; + } + + public Replication apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .update(resourceGroupName, registryName, replicationName, updateReplicationUpdateParameters, context); + return this; + } + + ReplicationImpl(ReplicationInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.replicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replications"); + } + + public Replication refresh() { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE) + .getValue(); + return this; + } + + public Replication refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getReplications() + .getWithResponse(resourceGroupName, registryName, replicationName, context) + .getValue(); + return this; + } + + public ReplicationImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ReplicationImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ReplicationImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateReplicationUpdateParameters.withTags(tags); + return this; + } + } + + public ReplicationImpl withProperties(ReplicationProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ReplicationImpl withRegionEndpointEnabled(Boolean regionEndpointEnabled) { + this.updateReplicationUpdateParameters.withRegionEndpointEnabled(regionEndpointEnabled); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java new file mode 100644 index 000000000000..f1bf069044e4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java @@ -0,0 +1,987 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.ReplicationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; +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 ReplicationsClient. + */ +public final class ReplicationsClientImpl implements ReplicationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ReplicationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ReplicationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ReplicationsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(ReplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientReplications to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientReplications") + public interface ReplicationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("replicationName") String replicationName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ReplicationInner replication, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ReplicationUpdateParameters replicationUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("replicationName") String replicationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified replication along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String replicationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String replicationName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, accept, context); + } + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified replication on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String replicationName) { + return getWithResponseAsync(resourceGroupName, registryName, replicationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String replicationName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, replicationName, context).block(); + } + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified replication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationInner get(String resourceGroupName, String registryName, String replicationName) { + return getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE).getValue(); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String replicationName, ReplicationInner replication) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, + replication, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String replicationName, ReplicationInner replication, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, contentType, accept, replication, context); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicationInner> beginCreateAsync(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, replicationName, replication); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationInner.class, ReplicationInner.class, this.client.getContext()); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicationInner> beginCreateAsync(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, replicationName, replication, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationInner.class, ReplicationInner.class, context); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication) { + return this.beginCreateAsync(resourceGroupName, registryName, replicationName, replication).getSyncPoller(); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, + String registryName, String replicationName, ReplicationInner replication, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, replicationName, replication, context) + .getSyncPoller(); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication) { + return beginCreateAsync(resourceGroupName, registryName, replicationName, replication).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication, Context context) { + return beginCreateAsync(resourceGroupName, registryName, replicationName, replication, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationInner create(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication) { + return createAsync(resourceGroupName, registryName, replicationName, replication).block(); + } + + /** + * Creates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replication The parameters for creating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationInner create(String resourceGroupName, String registryName, String replicationName, + ReplicationInner replication, Context context) { + return createAsync(resourceGroupName, registryName, replicationName, replication, context).block(); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, + replicationUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String replicationName, ReplicationUpdateParameters replicationUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, contentType, accept, replicationUpdateParameters, + context); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicationInner> beginUpdateAsync(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationInner.class, ReplicationInner.class, this.client.getContext()); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicationInner> beginUpdateAsync(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, + replicationName, replicationUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationInner.class, ReplicationInner.class, context); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, + String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationInner update(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters) { + return updateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters).block(); + } + + /** + * Updates a replication for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @param replicationUpdateParameters The parameters for updating a replication. + * @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 an object that represents a replication for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationInner update(String resourceGroupName, String registryName, String replicationName, + ReplicationUpdateParameters replicationUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) + .block(); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String replicationName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 registryName, + String replicationName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, context); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String replicationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, replicationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String replicationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, replicationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String replicationName) { + return this.beginDeleteAsync(resourceGroupName, registryName, replicationName).getSyncPoller(); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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> beginDelete(String resourceGroupName, String registryName, + String replicationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, replicationName, context).getSyncPoller(); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String replicationName) { + return beginDeleteAsync(resourceGroupName, registryName, replicationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 deleteAsync(String resourceGroupName, String registryName, String replicationName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, replicationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String replicationName) { + deleteAsync(resourceGroupName, registryName, replicationName).block(); + } + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context) { + deleteAsync(resourceGroupName, registryName, replicationName, context).block(); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java new file mode 100644 index 000000000000..b05c7b189bab --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ReplicationsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import com.azure.resourcemanager.containerregistry.generated.models.Replications; + +public final class ReplicationsImpl implements Replications { + private static final ClientLogger LOGGER = new ClientLogger(ReplicationsImpl.class); + + private final ReplicationsClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public ReplicationsImpl(ReplicationsClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, String replicationName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, replicationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ReplicationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Replication get(String resourceGroupName, String registryName, String replicationName) { + ReplicationInner inner = this.serviceClient().get(resourceGroupName, registryName, replicationName); + if (inner != null) { + return new ReplicationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String replicationName) { + this.serviceClient().delete(resourceGroupName, registryName, replicationName); + } + + public void delete(String resourceGroupName, String registryName, String replicationName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, replicationName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + } + + public Replication getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); + if (replicationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); + if (replicationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, replicationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); + if (replicationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); + } + this.delete(resourceGroupName, registryName, replicationName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); + if (replicationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); + } + this.delete(resourceGroupName, registryName, replicationName, context); + } + + private ReplicationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public ReplicationImpl define(String name) { + return new ReplicationImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java new file mode 100644 index 000000000000..728b711a62db --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java new file mode 100644 index 000000000000..f306723775ad --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; +import java.util.List; + +public final class ScopeMapImpl implements ScopeMap, ScopeMap.Definition, ScopeMap.Update { + private ScopeMapInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ScopeMapProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScopeMapInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String scopeMapName; + + private ScopeMapUpdateParameters updateScopeMapUpdateParameters; + + public ScopeMapImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public ScopeMap create() { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .create(resourceGroupName, registryName, scopeMapName, this.innerModel(), Context.NONE); + return this; + } + + public ScopeMap create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .create(resourceGroupName, registryName, scopeMapName, this.innerModel(), context); + return this; + } + + ScopeMapImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new ScopeMapInner(); + this.serviceManager = serviceManager; + this.scopeMapName = name; + } + + public ScopeMapImpl update() { + this.updateScopeMapUpdateParameters = new ScopeMapUpdateParameters(); + return this; + } + + public ScopeMap apply() { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .update(resourceGroupName, registryName, scopeMapName, updateScopeMapUpdateParameters, Context.NONE); + return this; + } + + public ScopeMap apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .update(resourceGroupName, registryName, scopeMapName, updateScopeMapUpdateParameters, context); + return this; + } + + ScopeMapImpl(ScopeMapInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.scopeMapName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scopeMaps"); + } + + public ScopeMap refresh() { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE) + .getValue(); + return this; + } + + public ScopeMap refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScopeMaps() + .getWithResponse(resourceGroupName, registryName, scopeMapName, context) + .getValue(); + return this; + } + + public ScopeMapImpl withProperties(ScopeMapProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ScopeMapImpl withDescription(String description) { + this.updateScopeMapUpdateParameters.withDescription(description); + return this; + } + + public ScopeMapImpl withActions(List actions) { + this.updateScopeMapUpdateParameters.withActions(actions); + return this; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java new file mode 100644 index 000000000000..a2e8e281daf1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java @@ -0,0 +1,976 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.ScopeMapsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; +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 ScopeMapsClient. + */ +public final class ScopeMapsClientImpl implements ScopeMapsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScopeMapsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ScopeMapsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScopeMapsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(ScopeMapsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientScopeMaps to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientScopeMaps") + public interface ScopeMapsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScopeMapInner scopeMapCreateParameters, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("scopeMapName") String scopeMapName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified scope map along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, accept, context); + } + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified scope map on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String scopeMapName) { + return getWithResponseAsync(resourceGroupName, registryName, scopeMapName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, + Context context) { + return getWithResponseAsync(resourceGroupName, registryName, scopeMapName, context).block(); + } + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified scope map. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopeMapInner get(String resourceGroupName, String registryName, String scopeMapName) { + return getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE).getValue(); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapInner scopeMapCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, + scopeMapCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapCreateParameters, context); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScopeMapInner> beginCreateAsync(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScopeMapInner.class, ScopeMapInner.class, this.client.getContext()); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScopeMapInner> beginCreateAsync(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScopeMapInner.class, ScopeMapInner.class, context); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters) { + return createAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters).block(); + } + + /** + * Creates a scope map for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapCreateParameters The parameters for creating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapInner scopeMapCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context).block(); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, + scopeMapUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapUpdateParameters, context); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScopeMapInner> beginUpdateAsync(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScopeMapInner.class, ScopeMapInner.class, this.client.getContext()); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScopeMapInner> beginUpdateAsync(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScopeMapInner.class, ScopeMapInner.class, context); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, + String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters) { + return updateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters).block(); + } + + /** + * Updates a scope map with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @param scopeMapUpdateParameters The parameters for updating a scope map. + * @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 an object that represents a scope map for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, + ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context).block(); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String scopeMapName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 registryName, + String scopeMapName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, context); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String scopeMapName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, scopeMapName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String scopeMapName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, scopeMapName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String scopeMapName) { + return this.beginDeleteAsync(resourceGroupName, registryName, scopeMapName).getSyncPoller(); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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> beginDelete(String resourceGroupName, String registryName, + String scopeMapName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, scopeMapName, context).getSyncPoller(); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String scopeMapName) { + return beginDeleteAsync(resourceGroupName, registryName, scopeMapName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 deleteAsync(String resourceGroupName, String registryName, String scopeMapName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, scopeMapName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String scopeMapName) { + deleteAsync(resourceGroupName, registryName, scopeMapName).block(); + } + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context) { + deleteAsync(resourceGroupName, registryName, scopeMapName, context).block(); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java new file mode 100644 index 000000000000..9a9bd14d382b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ScopeMapsClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMaps; + +public final class ScopeMapsImpl implements ScopeMaps { + private static final ClientLogger LOGGER = new ClientLogger(ScopeMapsImpl.class); + + private final ScopeMapsClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public ScopeMapsImpl(ScopeMapsClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, scopeMapName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScopeMapImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScopeMap get(String resourceGroupName, String registryName, String scopeMapName) { + ScopeMapInner inner = this.serviceClient().get(resourceGroupName, registryName, scopeMapName); + if (inner != null) { + return new ScopeMapImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String scopeMapName) { + this.serviceClient().delete(resourceGroupName, registryName, scopeMapName); + } + + public void delete(String resourceGroupName, String registryName, String scopeMapName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, scopeMapName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScopeMapImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScopeMapImpl(inner1, this.manager())); + } + + public ScopeMap getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); + if (scopeMapName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); + if (scopeMapName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, scopeMapName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); + if (scopeMapName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); + } + this.delete(resourceGroupName, registryName, scopeMapName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); + if (scopeMapName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); + } + this.delete(resourceGroupName, registryName, scopeMapName, context); + } + + private ScopeMapsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public ScopeMapImpl define(String name) { + return new ScopeMapImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java new file mode 100644 index 000000000000..ae0e0d6aeb6a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; +import com.azure.resourcemanager.containerregistry.generated.models.Token; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; +import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; + +public final class TokenImpl implements Token, Token.Definition, Token.Update { + private TokenInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public TokenProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public TokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String tokenName; + + private TokenUpdateParameters updateTokenUpdateParameters; + + public TokenImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public Token create() { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .create(resourceGroupName, registryName, tokenName, this.innerModel(), Context.NONE); + return this; + } + + public Token create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .create(resourceGroupName, registryName, tokenName, this.innerModel(), context); + return this; + } + + TokenImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = new TokenInner(); + this.serviceManager = serviceManager; + this.tokenName = name; + } + + public TokenImpl update() { + this.updateTokenUpdateParameters = new TokenUpdateParameters(); + return this; + } + + public Token apply() { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .update(resourceGroupName, registryName, tokenName, updateTokenUpdateParameters, Context.NONE); + return this; + } + + public Token apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .update(resourceGroupName, registryName, tokenName, updateTokenUpdateParameters, context); + return this; + } + + TokenImpl(TokenInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.tokenName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "tokens"); + } + + public Token refresh() { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE) + .getValue(); + return this; + } + + public Token refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTokens() + .getWithResponse(resourceGroupName, registryName, tokenName, context) + .getValue(); + return this; + } + + public TokenImpl withProperties(TokenProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public TokenImpl withScopeMapId(String scopeMapId) { + this.updateTokenUpdateParameters.withScopeMapId(scopeMapId); + return this; + } + + public TokenImpl withStatus(TokenStatus status) { + this.updateTokenUpdateParameters.withStatus(status); + return this; + } + + public TokenImpl withCredentials(TokenCredentialsProperties credentials) { + this.updateTokenUpdateParameters.withCredentials(credentials); + return this; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java new file mode 100644 index 000000000000..d6306afb628d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java @@ -0,0 +1,972 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.TokensClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult; +import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; +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 TokensClient. + */ +public final class TokensClientImpl implements TokensClient { + /** + * The proxy service used to perform REST calls. + */ + private final TokensService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of TokensClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TokensClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = RestProxy.create(TokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientTokens to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientTokens") + public interface TokensService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("tokenName") String tokenName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") TokenInner tokenCreateParameters, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TokenUpdateParameters tokenUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("tokenName") String tokenName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String tokenName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String tokenName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, accept, context); + } + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified token on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String tokenName) { + return getWithResponseAsync(resourceGroupName, registryName, tokenName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String tokenName, + Context context) { + return getWithResponseAsync(resourceGroupName, registryName, tokenName, context).block(); + } + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TokenInner get(String resourceGroupName, String registryName, String tokenName) { + return getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE).getValue(); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, + tokenCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, contentType, accept, tokenCreateParameters, context); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TokenInner> beginCreateAsync(String resourceGroupName, + String registryName, String tokenName, TokenInner tokenCreateParameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, + TokenInner.class, this.client.getContext()); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TokenInner> beginCreateAsync(String resourceGroupName, + String registryName, String tokenName, TokenInner tokenCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, + TokenInner.class, context); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).getSyncPoller(); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, + String tokenName, TokenInner tokenCreateParameters, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String tokenName, + TokenInner tokenCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String tokenName, + TokenInner tokenCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TokenInner create(String resourceGroupName, String registryName, String tokenName, + TokenInner tokenCreateParameters) { + return createAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).block(); + } + + /** + * Creates a token for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenCreateParameters The parameters for creating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TokenInner create(String resourceGroupName, String registryName, String tokenName, + TokenInner tokenCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context).block(); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, + tokenUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, contentType, accept, tokenUpdateParameters, context); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TokenInner> beginUpdateAsync(String resourceGroupName, + String registryName, String tokenName, TokenUpdateParameters tokenUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, + TokenInner.class, this.client.getContext()); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TokenInner> beginUpdateAsync(String resourceGroupName, + String registryName, String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, + TokenInner.class, context); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).getSyncPoller(); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, + String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TokenInner update(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters) { + return updateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).block(); + } + + /** + * Updates a token with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @param tokenUpdateParameters The parameters for updating a token. + * @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 an object that represents a token for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TokenInner update(String resourceGroupName, String registryName, String tokenName, + TokenUpdateParameters tokenUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context).block(); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String tokenName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 registryName, + String tokenName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, context); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String tokenName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, tokenName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String tokenName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, tokenName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String tokenName) { + return this.beginDeleteAsync(resourceGroupName, registryName, tokenName).getSyncPoller(); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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> beginDelete(String resourceGroupName, String registryName, + String tokenName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, tokenName, context).getSyncPoller(); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String tokenName) { + return beginDeleteAsync(resourceGroupName, registryName, tokenName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 deleteAsync(String resourceGroupName, String registryName, String tokenName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, tokenName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String tokenName) { + deleteAsync(resourceGroupName, registryName, tokenName).block(); + } + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context) { + deleteAsync(resourceGroupName, registryName, tokenName, context).block(); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java new file mode 100644 index 000000000000..23f820ce90ad --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.TokensClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; +import com.azure.resourcemanager.containerregistry.generated.models.Token; +import com.azure.resourcemanager.containerregistry.generated.models.Tokens; + +public final class TokensImpl implements Tokens { + private static final ClientLogger LOGGER = new ClientLogger(TokensImpl.class); + + private final TokensClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public TokensImpl(TokensClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, String tokenName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, tokenName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Token get(String resourceGroupName, String registryName, String tokenName) { + TokenInner inner = this.serviceClient().get(resourceGroupName, registryName, tokenName); + if (inner != null) { + return new TokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String tokenName) { + this.serviceClient().delete(resourceGroupName, registryName, tokenName); + } + + public void delete(String resourceGroupName, String registryName, String tokenName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, tokenName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TokenImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TokenImpl(inner1, this.manager())); + } + + public Token getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); + if (tokenName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); + if (tokenName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, tokenName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); + if (tokenName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); + } + this.delete(resourceGroupName, registryName, tokenName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); + if (tokenName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); + } + this.delete(resourceGroupName, registryName, tokenName, context); + } + + private TokensClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public TokenImpl define(String name) { + return new TokenImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java new file mode 100644 index 000000000000..f6a350ae4a70 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; +import com.azure.resourcemanager.containerregistry.generated.models.Event; +import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class WebhookImpl implements Webhook, Webhook.Definition, Webhook.Update { + private WebhookInner innerObject; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 WebhookProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public WebhookInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private String webhookName; + + private WebhookCreateParameters createWebhookCreateParameters; + + private WebhookUpdateParameters updateWebhookUpdateParameters; + + public WebhookImpl withExistingRegistry(String resourceGroupName, String registryName) { + this.resourceGroupName = resourceGroupName; + this.registryName = registryName; + return this; + } + + public Webhook create() { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .create(resourceGroupName, registryName, webhookName, createWebhookCreateParameters, Context.NONE); + return this; + } + + public Webhook create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .create(resourceGroupName, registryName, webhookName, createWebhookCreateParameters, context); + return this; + } + + WebhookImpl(String name, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.serviceManager = serviceManager; + this.webhookName = name; + this.createWebhookCreateParameters = new WebhookCreateParameters(); + } + + public WebhookImpl update() { + this.updateWebhookUpdateParameters = new WebhookUpdateParameters(); + return this; + } + + public Webhook apply() { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .update(resourceGroupName, registryName, webhookName, updateWebhookUpdateParameters, Context.NONE); + return this; + } + + public Webhook apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .update(resourceGroupName, registryName, webhookName, updateWebhookUpdateParameters, context); + return this; + } + + WebhookImpl(WebhookInner innerObject, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.webhookName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webhooks"); + } + + public Webhook refresh() { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE) + .getValue(); + return this; + } + + public Webhook refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWebhooks() + .getWithResponse(resourceGroupName, registryName, webhookName, context) + .getValue(); + return this; + } + + public Response pingWithResponse(Context context) { + return serviceManager.webhooks().pingWithResponse(resourceGroupName, registryName, webhookName, context); + } + + public EventInfo ping() { + return serviceManager.webhooks().ping(resourceGroupName, registryName, webhookName); + } + + public PagedIterable listEvents() { + return serviceManager.webhooks().listEvents(resourceGroupName, registryName, webhookName); + } + + public PagedIterable listEvents(Context context) { + return serviceManager.webhooks().listEvents(resourceGroupName, registryName, webhookName, context); + } + + public Response getCallbackConfigWithResponse(Context context) { + return serviceManager.webhooks() + .getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, context); + } + + public CallbackConfig getCallbackConfig() { + return serviceManager.webhooks().getCallbackConfig(resourceGroupName, registryName, webhookName); + } + + public WebhookImpl withRegion(Region location) { + this.createWebhookCreateParameters.withLocation(location.toString()); + return this; + } + + public WebhookImpl withRegion(String location) { + this.createWebhookCreateParameters.withLocation(location); + return this; + } + + public WebhookImpl withTags(Map tags) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withTags(tags); + return this; + } else { + this.updateWebhookUpdateParameters.withTags(tags); + return this; + } + } + + public WebhookImpl withServiceUri(String serviceUri) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withServiceUri(serviceUri); + return this; + } else { + this.updateWebhookUpdateParameters.withServiceUri(serviceUri); + return this; + } + } + + public WebhookImpl withCustomHeaders(Map customHeaders) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withCustomHeaders(customHeaders); + return this; + } else { + this.updateWebhookUpdateParameters.withCustomHeaders(customHeaders); + return this; + } + } + + public WebhookImpl withStatus(WebhookStatus status) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withStatus(status); + return this; + } else { + this.updateWebhookUpdateParameters.withStatus(status); + return this; + } + } + + public WebhookImpl withScope(String scope) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withScope(scope); + return this; + } else { + this.updateWebhookUpdateParameters.withScope(scope); + return this; + } + } + + public WebhookImpl withActions(List actions) { + if (isInCreateMode()) { + this.createWebhookCreateParameters.withActions(actions); + return this; + } else { + this.updateWebhookUpdateParameters.withActions(actions); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java new file mode 100644 index 000000000000..18f15c1e4032 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java @@ -0,0 +1,1363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.WebhooksClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; +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 WebhooksClient. + */ +public final class WebhooksClientImpl implements WebhooksClient { + /** + * The proxy service used to perform REST calls. + */ + private final WebhooksService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of WebhooksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebhooksClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = RestProxy.create(WebhooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientWebhooks to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientWebhooks") + public interface WebhooksService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebhookCreateParameters webhookCreateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebhookUpdateParameters webhookUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> ping(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listEvents(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getCallbackConfig(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("webhookName") String webhookName, @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listEventsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified webhook along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String webhookName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); + } + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified webhook on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String webhookName) { + return getWithResponseAsync(resourceGroupName, registryName, webhookName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context) { + return getWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); + } + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 properties of the specified webhook. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookInner get(String resourceGroupName, String registryName, String webhookName) { + return getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, + webhookCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, contentType, accept, webhookCreateParameters, context); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WebhookInner> beginCreateAsync(String resourceGroupName, + String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebhookInner.class, WebhookInner.class, this.client.getContext()); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WebhookInner> beginCreateAsync(String resourceGroupName, + String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebhookInner.class, WebhookInner.class, context); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, + String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { + return this.beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookInner create(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters) { + return createAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).block(); + } + + /** + * Creates a webhook for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookCreateParameters The parameters for creating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookInner create(String resourceGroupName, String registryName, String webhookName, + WebhookCreateParameters webhookCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context).block(); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, + webhookUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, contentType, accept, webhookUpdateParameters, context); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WebhookInner> beginUpdateAsync(String resourceGroupName, + String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebhookInner.class, WebhookInner.class, this.client.getContext()); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WebhookInner> beginUpdateAsync(String resourceGroupName, + String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebhookInner.class, WebhookInner.class, context); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, + String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookInner update(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters) { + return updateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).block(); + } + + /** + * Updates a webhook with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @param webhookUpdateParameters The parameters for updating a webhook. + * @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 an object that represents a webhook for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookInner update(String resourceGroupName, String registryName, String webhookName, + WebhookUpdateParameters webhookUpdateParameters, Context context) { + return updateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context).block(); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, + String webhookName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 registryName, + String webhookName, Context context) { + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, context); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, + String webhookName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, webhookName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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> beginDeleteAsync(String resourceGroupName, String registryName, + String webhookName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, webhookName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginDelete(String resourceGroupName, String registryName, + String webhookName) { + return this.beginDeleteAsync(resourceGroupName, registryName, webhookName).getSyncPoller(); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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> beginDelete(String resourceGroupName, String registryName, + String webhookName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, webhookName, context).getSyncPoller(); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 registryName, String webhookName) { + return beginDeleteAsync(resourceGroupName, registryName, webhookName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 deleteAsync(String resourceGroupName, String registryName, String webhookName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, webhookName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String webhookName) { + deleteAsync(resourceGroupName, registryName, webhookName).block(); + } + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context) { + deleteAsync(resourceGroupName, registryName, webhookName, context).block(); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, + String webhookName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.ping(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 basic information of an event on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono pingAsync(String resourceGroupName, String registryName, String webhookName) { + return pingWithResponseAsync(resourceGroupName, registryName, webhookName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context) { + return pingWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 basic information of an event. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventInfoInner ping(String resourceGroupName, String registryName, String webhookName) { + return pingWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list events for a webhook along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventsSinglePageAsync(String resourceGroupName, String registryName, + String webhookName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listEvents(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, 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())); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventsSinglePageAsync(String resourceGroupName, String registryName, + String webhookName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listEvents(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list events for a webhook as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEventsAsync(String resourceGroupName, String registryName, String webhookName) { + return new PagedFlux<>(() -> listEventsSinglePageAsync(resourceGroupName, registryName, webhookName), + nextLink -> listEventsNextSinglePageAsync(nextLink)); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEventsAsync(String resourceGroupName, String registryName, String webhookName, + Context context) { + return new PagedFlux<>(() -> listEventsSinglePageAsync(resourceGroupName, registryName, webhookName, context), + nextLink -> listEventsNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName) { + return new PagedIterable<>(listEventsAsync(resourceGroupName, registryName, webhookName)); + } + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, + Context context) { + return new PagedIterable<>(listEventsAsync(resourceGroupName, registryName, webhookName, context)); + } + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 configuration of service URI and custom headers for the webhook along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, + String registryName, String webhookName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, + String registryName, String webhookName, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context); + } + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 configuration of service URI and custom headers for the webhook on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCallbackConfigAsync(String resourceGroupName, String registryName, + String webhookName) { + return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context) { + return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); + } + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 configuration of service URI and custom headers for the webhook. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { + return getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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. + * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list events for a webhook along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listEventsNext(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. + * @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 result of a request to list events for a webhook along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventsNextSinglePageAsync(String nextLink, Context context) { + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listEventsNext(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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java new file mode 100644 index 000000000000..1e1f9f70c9b1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.WebhooksClient; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; +import com.azure.resourcemanager.containerregistry.generated.models.Event; +import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.Webhooks; + +public final class WebhooksImpl implements Webhooks { + private static final ClientLogger LOGGER = new ClientLogger(WebhooksImpl.class); + + private final WebhooksClient innerClient; + + private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; + + public WebhooksImpl(WebhooksClient innerClient, + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, registryName, webhookName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebhookImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Webhook get(String resourceGroupName, String registryName, String webhookName) { + WebhookInner inner = this.serviceClient().get(resourceGroupName, registryName, webhookName); + if (inner != null) { + return new WebhookImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String registryName, String webhookName) { + this.serviceClient().delete(resourceGroupName, registryName, webhookName); + } + + public void delete(String resourceGroupName, String registryName, String webhookName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, webhookName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookImpl(inner1, this.manager())); + } + + public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context) { + Response inner + = this.serviceClient().pingWithResponse(resourceGroupName, registryName, webhookName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EventInfo ping(String resourceGroupName, String registryName, String webhookName) { + EventInfoInner inner = this.serviceClient().ping(resourceGroupName, registryName, webhookName); + if (inner != null) { + return new EventInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName) { + PagedIterable inner = this.serviceClient().listEvents(resourceGroupName, registryName, webhookName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); + } + + public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, + Context context) { + PagedIterable inner + = this.serviceClient().listEvents(resourceGroupName, registryName, webhookName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); + } + + public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context) { + Response inner + = this.serviceClient().getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CallbackConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CallbackConfig getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { + CallbackConfigInner inner + = this.serviceClient().getCallbackConfig(resourceGroupName, registryName, webhookName); + if (inner != null) { + return new CallbackConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Webhook getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); + if (webhookName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); + if (webhookName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, webhookName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); + if (webhookName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); + } + this.delete(resourceGroupName, registryName, webhookName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); + if (webhookName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); + } + this.delete(resourceGroupName, registryName, webhookName, context); + } + + private WebhooksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { + return this.serviceManager; + } + + public WebhookImpl define(String name) { + return new WebhookImpl(name, this.manager()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java new file mode 100644 index 000000000000..ac5e83394365 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list cache rules for a container registry. + */ +@Immutable +public final class CacheRulesListResult implements JsonSerializable { + /* + * The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next + * list of cache rules. + */ + private List value; + + /* + * The URI that can be used to request the next list of cache rules. + */ + private String nextLink; + + /** + * Creates an instance of CacheRulesListResult class. + */ + private CacheRulesListResult() { + } + + /** + * Get the value property: The list of cache rules. Since this list may be incomplete, the nextLink field should be + * used to request the next list of cache rules. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of cache rules. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheRulesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheRulesListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheRulesListResult. + */ + public static CacheRulesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheRulesListResult deserializedCacheRulesListResult = new CacheRulesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CacheRuleInner.fromJson(reader1)); + deserializedCacheRulesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCacheRulesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheRulesListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java new file mode 100644 index 000000000000..ac4a2eacf858 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list connected registries for a container registry. + */ +@Immutable +public final class ConnectedRegistryListResult implements JsonSerializable { + /* + * The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request + * the next list of connected registries. + */ + private List value; + + /* + * The URI that can be used to request the next list of connected registries. + */ + private String nextLink; + + /** + * Creates an instance of ConnectedRegistryListResult class. + */ + private ConnectedRegistryListResult() { + } + + /** + * Get the value property: The list of connected registries. Since this list may be incomplete, the nextLink field + * should be used to request the next list of connected registries. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of connected registries. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedRegistryListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedRegistryListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedRegistryListResult. + */ + public static ConnectedRegistryListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedRegistryListResult deserializedConnectedRegistryListResult = new ConnectedRegistryListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ConnectedRegistryInner.fromJson(reader1)); + deserializedConnectedRegistryListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedConnectedRegistryListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedRegistryListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java new file mode 100644 index 000000000000..33effd2eb4e2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list credential sets for a container registry. + */ +@Immutable +public final class CredentialSetListResult implements JsonSerializable { + /* + * The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the + * next list of credential sets. + */ + private List value; + + /* + * The URI that can be used to request the next list of credential sets. + */ + private String nextLink; + + /** + * Creates an instance of CredentialSetListResult class. + */ + private CredentialSetListResult() { + } + + /** + * Get the value property: The list of credential sets. Since this list may be incomplete, the nextLink field should + * be used to request the next list of credential sets. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of credential sets. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialSetListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialSetListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CredentialSetListResult. + */ + public static CredentialSetListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialSetListResult deserializedCredentialSetListResult = new CredentialSetListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CredentialSetInner.fromJson(reader1)); + deserializedCredentialSetListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCredentialSetListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialSetListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java new file mode 100644 index 000000000000..a68782da1937 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list events for a webhook. + */ +@Immutable +public final class EventListResult implements JsonSerializable { + /* + * The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list + * of events. + */ + private List value; + + /* + * The URI that can be used to request the next list of events. + */ + private String nextLink; + + /** + * Creates an instance of EventListResult class. + */ + private EventListResult() { + } + + /** + * Get the value property: The list of events. Since this list may be incomplete, the nextLink field should be used + * to request the next list of events. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of events. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EventListResult. + */ + public static EventListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventListResult deserializedEventListResult = new EventListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> EventInner.fromJson(reader1)); + deserializedEventListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEventListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java new file mode 100644 index 000000000000..5fb42cde45a8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list container registry operations. + */ +@Immutable +public final class OperationListResult implements JsonSerializable { + /* + * The list of container registry operations. Since this list may be incomplete, the nextLink field should be used + * to request the next list of operations. + */ + private List value; + + /* + * The URI that can be used to request the next list of container registry operations. + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + private OperationListResult() { + } + + /** + * Get the value property: The list of container registry operations. Since this list may be incomplete, the + * nextLink field should be used to request the next list of operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of container registry operations. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationDefinitionInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..dcfda77abc57 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list private endpoint connections for a container registry. + */ +@Immutable +public final class PrivateEndpointConnectionListResult + implements JsonSerializable { + /* + * The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to + * request the next list of private endpoint connections. + */ + private List value; + + /* + * The URI that can be used to request the next list of private endpoint connections. + */ + private String nextLink; + + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ + private PrivateEndpointConnectionListResult() { + } + + /** + * Get the value property: The list of private endpoint connections. Since this list may be incomplete, the nextLink + * field should be used to request the next list of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of private endpoint connections. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + */ + public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult + = new PrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..c3c89bb86d89 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list private link resources for a container registry. + */ +@Immutable +public final class PrivateLinkResourceListResult implements JsonSerializable { + /* + * The list of private link resources. Since this list may be incomplete, the nextLink field should be used to + * request the next list of private link resources. + */ + private List value; + + /* + * The URI that can be used to request the next list of private link resources. + */ + private String nextLink; + + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ + private PrivateLinkResourceListResult() { + } + + /** + * Get the value property: The list of private link resources. Since this list may be incomplete, the nextLink field + * should be used to request the next list of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of private link resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult. + */ + public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult + = new PrivateLinkResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java new file mode 100644 index 000000000000..7fc9f7266b32 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list container registries. + */ +@Immutable +public final class RegistryListResult implements JsonSerializable { + /* + * The list of container registries. Since this list may be incomplete, the nextLink field should be used to request + * the next list of container registries. + */ + private List value; + + /* + * The URI that can be used to request the next list of container registries. + */ + private String nextLink; + + /** + * Creates an instance of RegistryListResult class. + */ + private RegistryListResult() { + } + + /** + * Get the value property: The list of container registries. Since this list may be incomplete, the nextLink field + * should be used to request the next list of container registries. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of container registries. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryListResult. + */ + public static RegistryListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryListResult deserializedRegistryListResult = new RegistryListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> RegistryInner.fromJson(reader1)); + deserializedRegistryListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRegistryListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java new file mode 100644 index 000000000000..7088bbcc45d8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list replications for a container registry. + */ +@Immutable +public final class ReplicationListResult implements JsonSerializable { + /* + * The list of replications. Since this list may be incomplete, the nextLink field should be used to request the + * next list of replications. + */ + private List value; + + /* + * The URI that can be used to request the next list of replications. + */ + private String nextLink; + + /** + * Creates an instance of ReplicationListResult class. + */ + private ReplicationListResult() { + } + + /** + * Get the value property: The list of replications. Since this list may be incomplete, the nextLink field should be + * used to request the next list of replications. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of replications. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationListResult. + */ + public static ReplicationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationListResult deserializedReplicationListResult = new ReplicationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ReplicationInner.fromJson(reader1)); + deserializedReplicationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedReplicationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java new file mode 100644 index 000000000000..319e16193414 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list scope maps for a container registry. + */ +@Immutable +public final class ScopeMapListResult implements JsonSerializable { + /* + * The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next + * list of scope maps. + */ + private List value; + + /* + * The URI that can be used to request the next list of scope maps. + */ + private String nextLink; + + /** + * Creates an instance of ScopeMapListResult class. + */ + private ScopeMapListResult() { + } + + /** + * Get the value property: The list of scope maps. Since this list may be incomplete, the nextLink field should be + * used to request the next list of scope maps. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of scope maps. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopeMapListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopeMapListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ScopeMapListResult. + */ + public static ScopeMapListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopeMapListResult deserializedScopeMapListResult = new ScopeMapListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ScopeMapInner.fromJson(reader1)); + deserializedScopeMapListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScopeMapListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScopeMapListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java new file mode 100644 index 000000000000..7a83d4eb70f3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list tokens for a container registry. + */ +@Immutable +public final class TokenListResult implements JsonSerializable { + /* + * The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list + * of tokens. + */ + private List value; + + /* + * The URI that can be used to request the next list of tokens. + */ + private String nextLink; + + /** + * Creates an instance of TokenListResult class. + */ + private TokenListResult() { + } + + /** + * Get the value property: The list of tokens. Since this list may be incomplete, the nextLink field should be used + * to request the next list of tokens. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of tokens. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenListResult. + */ + public static TokenListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenListResult deserializedTokenListResult = new TokenListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TokenInner.fromJson(reader1)); + deserializedTokenListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTokenListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java new file mode 100644 index 000000000000..96f9f59ec06a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list webhooks for a container registry. + */ +@Immutable +public final class WebhookListResult implements JsonSerializable { + /* + * The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next + * list of webhooks. + */ + private List value; + + /* + * The URI that can be used to request the next list of webhooks. + */ + private String nextLink; + + /** + * Creates an instance of WebhookListResult class. + */ + private WebhookListResult() { + } + + /** + * Get the value property: The list of webhooks. Since this list may be incomplete, the nextLink field should be + * used to request the next list of webhooks. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of webhooks. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WebhookListResult. + */ + public static WebhookListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookListResult deserializedWebhookListResult = new WebhookListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> WebhookInner.fromJson(reader1)); + deserializedWebhookListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWebhookListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java new file mode 100644 index 000000000000..3be628c175ab --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the implementations for ContainerRegistry. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +package com.azure.resourcemanager.containerregistry.generated.implementation; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java new file mode 100644 index 000000000000..942f2a7b92a8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The action of IP ACL rule. + */ +public final class Action extends ExpandableStringEnum { + /** + * Static value Allow for Action. + */ + public static final Action ALLOW = fromString("Allow"); + + /** + * Creates a new instance of Action value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Action() { + } + + /** + * Creates or finds a Action from its string representation. + * + * @param name a name to look for. + * @return the corresponding Action. + */ + public static Action fromString(String name) { + return fromString(name, Action.class); + } + + /** + * Gets known Action values. + * + * @return known Action values. + */ + public static Collection values() { + return values(Action.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java new file mode 100644 index 000000000000..762b69700ae6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A message indicating if changes on the service provider require any updates on the consumer. + */ +public final class ActionsRequired extends ExpandableStringEnum { + /** + * Static value None for ActionsRequired. + */ + public static final ActionsRequired NONE = fromString("None"); + + /** + * Static value Recreate for ActionsRequired. + */ + public static final ActionsRequired RECREATE = fromString("Recreate"); + + /** + * Creates a new instance of ActionsRequired value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionsRequired() { + } + + /** + * Creates or finds a ActionsRequired from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionsRequired. + */ + public static ActionsRequired fromString(String name) { + return fromString(name, ActionsRequired.class); + } + + /** + * Gets known ActionsRequired values. + * + * @return known ActionsRequired values. + */ + public static Collection values() { + return values(ActionsRequired.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java new file mode 100644 index 000000000000..a30be97c5946 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The activation properties of the connected registry. + */ +@Immutable +public final class ActivationProperties implements JsonSerializable { + /* + * The activation status of the connected registry. + */ + private ActivationStatus status; + + /** + * Creates an instance of ActivationProperties class. + */ + private ActivationProperties() { + } + + /** + * Get the status property: The activation status of the connected registry. + * + * @return the status value. + */ + public ActivationStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivationProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActivationProperties. + */ + public static ActivationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivationProperties deserializedActivationProperties = new ActivationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedActivationProperties.status = ActivationStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActivationProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java new file mode 100644 index 000000000000..6118f3dbb7aa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The activation status of the connected registry. + */ +public final class ActivationStatus extends ExpandableStringEnum { + /** + * Static value Active for ActivationStatus. + */ + public static final ActivationStatus ACTIVE = fromString("Active"); + + /** + * Static value Inactive for ActivationStatus. + */ + public static final ActivationStatus INACTIVE = fromString("Inactive"); + + /** + * Creates a new instance of ActivationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActivationStatus() { + } + + /** + * Creates or finds a ActivationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActivationStatus. + */ + public static ActivationStatus fromString(String name) { + return fromString(name, ActivationStatus.class); + } + + /** + * Gets known ActivationStatus values. + * + * @return known ActivationStatus values. + */ + public static Collection values() { + return values(ActivationStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java new file mode 100644 index 000000000000..b6d35021e08e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The agent that initiated the event. For most situations, this could be from the authorization context of the request. + */ +@Immutable +public final class Actor implements JsonSerializable { + /* + * The subject or username associated with the request context that generated the event. + */ + private String name; + + /** + * Creates an instance of Actor class. + */ + private Actor() { + } + + /** + * Get the name property: The subject or username associated with the request context that generated the event. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Actor from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Actor if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Actor. + */ + public static Actor fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Actor deserializedActor = new Actor(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedActor.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActor; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java new file mode 100644 index 000000000000..43b4ee7ba8f9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether audit logs are enabled on the connected registry. + */ +public final class AuditLogStatus extends ExpandableStringEnum { + /** + * Static value Enabled for AuditLogStatus. + */ + public static final AuditLogStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for AuditLogStatus. + */ + public static final AuditLogStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AuditLogStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuditLogStatus() { + } + + /** + * Creates or finds a AuditLogStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuditLogStatus. + */ + public static AuditLogStatus fromString(String name) { + return fromString(name, AuditLogStatus.class); + } + + /** + * Gets known AuditLogStatus values. + * + * @return known AuditLogStatus values. + */ + public static Collection values() { + return values(AuditLogStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java new file mode 100644 index 000000000000..3721d80629dc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Authentication credential stored for an upstream. + */ +@Fluent +public final class AuthCredential implements JsonSerializable { + /* + * The name of the credential. + */ + private CredentialName name; + + /* + * KeyVault Secret URI for accessing the username. + */ + private String usernameSecretIdentifier; + + /* + * KeyVault Secret URI for accessing the password. + */ + private String passwordSecretIdentifier; + + /* + * This provides data pertaining to the health of the auth credential. + */ + private CredentialHealth credentialHealth; + + /** + * Creates an instance of AuthCredential class. + */ + public AuthCredential() { + } + + /** + * Get the name property: The name of the credential. + * + * @return the name value. + */ + public CredentialName name() { + return this.name; + } + + /** + * Set the name property: The name of the credential. + * + * @param name the name value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withName(CredentialName name) { + this.name = name; + return this; + } + + /** + * Get the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. + * + * @return the usernameSecretIdentifier value. + */ + public String usernameSecretIdentifier() { + return this.usernameSecretIdentifier; + } + + /** + * Set the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. + * + * @param usernameSecretIdentifier the usernameSecretIdentifier value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withUsernameSecretIdentifier(String usernameSecretIdentifier) { + this.usernameSecretIdentifier = usernameSecretIdentifier; + return this; + } + + /** + * Get the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. + * + * @return the passwordSecretIdentifier value. + */ + public String passwordSecretIdentifier() { + return this.passwordSecretIdentifier; + } + + /** + * Set the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. + * + * @param passwordSecretIdentifier the passwordSecretIdentifier value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withPasswordSecretIdentifier(String passwordSecretIdentifier) { + this.passwordSecretIdentifier = passwordSecretIdentifier; + return this; + } + + /** + * Get the credentialHealth property: This provides data pertaining to the health of the auth credential. + * + * @return the credentialHealth value. + */ + public CredentialHealth credentialHealth() { + return this.credentialHealth; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeStringField("usernameSecretIdentifier", this.usernameSecretIdentifier); + jsonWriter.writeStringField("passwordSecretIdentifier", this.passwordSecretIdentifier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthCredential from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthCredential if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthCredential. + */ + public static AuthCredential fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthCredential deserializedAuthCredential = new AuthCredential(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAuthCredential.name = CredentialName.fromString(reader.getString()); + } else if ("usernameSecretIdentifier".equals(fieldName)) { + deserializedAuthCredential.usernameSecretIdentifier = reader.getString(); + } else if ("passwordSecretIdentifier".equals(fieldName)) { + deserializedAuthCredential.passwordSecretIdentifier = reader.getString(); + } else if ("credentialHealth".equals(fieldName)) { + deserializedAuthCredential.credentialHealth = CredentialHealth.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthCredential; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java new file mode 100644 index 000000000000..6b0b602ffa78 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The policy for using Azure Resource Manager audience token for a container registry. + */ +@Fluent +public final class AzureADAuthenticationAsArmPolicy implements JsonSerializable { + /* + * The value that indicates whether the policy is enabled or not. + */ + private AzureADAuthenticationAsArmPolicyStatus status; + + /** + * Creates an instance of AzureADAuthenticationAsArmPolicy class. + */ + public AzureADAuthenticationAsArmPolicy() { + } + + /** + * Get the status property: The value that indicates whether the policy is enabled or not. + * + * @return the status value. + */ + public AzureADAuthenticationAsArmPolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The value that indicates whether the policy is enabled or not. + * + * @param status the status value to set. + * @return the AzureADAuthenticationAsArmPolicy object itself. + */ + public AzureADAuthenticationAsArmPolicy withStatus(AzureADAuthenticationAsArmPolicyStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureADAuthenticationAsArmPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureADAuthenticationAsArmPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AzureADAuthenticationAsArmPolicy. + */ + public static AzureADAuthenticationAsArmPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureADAuthenticationAsArmPolicy deserializedAzureADAuthenticationAsArmPolicy + = new AzureADAuthenticationAsArmPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedAzureADAuthenticationAsArmPolicy.status + = AzureADAuthenticationAsArmPolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureADAuthenticationAsArmPolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java new file mode 100644 index 000000000000..cf8af7e4ed3a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The value that indicates whether the policy is enabled or not. + */ +public final class AzureADAuthenticationAsArmPolicyStatus + extends ExpandableStringEnum { + /** + * Static value enabled for AzureADAuthenticationAsArmPolicyStatus. + */ + public static final AzureADAuthenticationAsArmPolicyStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for AzureADAuthenticationAsArmPolicyStatus. + */ + public static final AzureADAuthenticationAsArmPolicyStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of AzureADAuthenticationAsArmPolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AzureADAuthenticationAsArmPolicyStatus() { + } + + /** + * Creates or finds a AzureADAuthenticationAsArmPolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureADAuthenticationAsArmPolicyStatus. + */ + public static AzureADAuthenticationAsArmPolicyStatus fromString(String name) { + return fromString(name, AzureADAuthenticationAsArmPolicyStatus.class); + } + + /** + * Gets known AzureADAuthenticationAsArmPolicyStatus values. + * + * @return known AzureADAuthenticationAsArmPolicyStatus values. + */ + public static Collection values() { + return values(AzureADAuthenticationAsArmPolicyStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java new file mode 100644 index 000000000000..61bea410bbe4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; + +/** + * An immutable client-side representation of CacheRule. + */ +public interface CacheRule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of the cache rule. + * + * @return the properties value. + */ + CacheRuleProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner object. + * + * @return the inner object. + */ + CacheRuleInner innerModel(); + + /** + * The entirety of the CacheRule definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The CacheRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CacheRule definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the CacheRule definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the CacheRule 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + CacheRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CacheRule create(Context context); + } + + /** + * The stage of the CacheRule definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the cache rule.. + * + * @param properties The properties of the cache rule. + * @return the next definition stage. + */ + WithCreate withProperties(CacheRuleProperties properties); + } + } + + /** + * Begins update for the CacheRule resource. + * + * @return the stage of resource update. + */ + CacheRule.Update update(); + + /** + * The template for CacheRule update. + */ + interface Update extends UpdateStages.WithCredentialSetResourceId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CacheRule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CacheRule apply(Context context); + } + + /** + * The CacheRule update stages. + */ + interface UpdateStages { + /** + * The stage of the CacheRule update allowing to specify credentialSetResourceId. + */ + interface WithCredentialSetResourceId { + /** + * Specifies the credentialSetResourceId property: The ARM resource ID of the credential store which is + * associated with the Cache rule.. + * + * @param credentialSetResourceId The ARM resource ID of the credential store which is associated with the + * Cache rule. + * @return the next definition stage. + */ + Update withCredentialSetResourceId(String credentialSetResourceId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CacheRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CacheRule refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java new file mode 100644 index 000000000000..63fed19c7159 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The properties of a cache rule. + */ +@Fluent +public final class CacheRuleProperties implements JsonSerializable { + /* + * The ARM resource ID of the credential store which is associated with the cache rule. + */ + private String credentialSetResourceId; + + /* + * Source repository pulled from upstream. + */ + private String sourceRepository; + + /* + * Target repository specified in docker pull command. + * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag} + */ + private String targetRepository; + + /* + * The creation date of the cache rule. + */ + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of CacheRuleProperties class. + */ + public CacheRuleProperties() { + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.credentialSetResourceId; + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withCredentialSetResourceId(String credentialSetResourceId) { + this.credentialSetResourceId = credentialSetResourceId; + return this; + } + + /** + * Get the sourceRepository property: Source repository pulled from upstream. + * + * @return the sourceRepository value. + */ + public String sourceRepository() { + return this.sourceRepository; + } + + /** + * Set the sourceRepository property: Source repository pulled from upstream. + * + * @param sourceRepository the sourceRepository value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withSourceRepository(String sourceRepository) { + this.sourceRepository = sourceRepository; + return this; + } + + /** + * Get the targetRepository property: Target repository specified in docker pull command. + * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @return the targetRepository value. + */ + public String targetRepository() { + return this.targetRepository; + } + + /** + * Set the targetRepository property: Target repository specified in docker pull command. + * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @param targetRepository the targetRepository value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withTargetRepository(String targetRepository) { + this.targetRepository = targetRepository; + return this; + } + + /** + * Get the creationDate property: The creation date of the cache rule. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("credentialSetResourceId", this.credentialSetResourceId); + jsonWriter.writeStringField("sourceRepository", this.sourceRepository); + jsonWriter.writeStringField("targetRepository", this.targetRepository); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheRuleProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheRuleProperties. + */ + public static CacheRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheRuleProperties deserializedCacheRuleProperties = new CacheRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("credentialSetResourceId".equals(fieldName)) { + deserializedCacheRuleProperties.credentialSetResourceId = reader.getString(); + } else if ("sourceRepository".equals(fieldName)) { + deserializedCacheRuleProperties.sourceRepository = reader.getString(); + } else if ("targetRepository".equals(fieldName)) { + deserializedCacheRuleProperties.targetRepository = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedCacheRuleProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedCacheRuleProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheRuleProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java new file mode 100644 index 000000000000..ff8dfbddff79 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties; +import java.io.IOException; + +/** + * The parameters for updating a cache rule. + */ +@Fluent +public final class CacheRuleUpdateParameters implements JsonSerializable { + /* + * The properties of the cache rule update parameters. + */ + private CacheRuleUpdateProperties innerProperties; + + /** + * Creates an instance of CacheRuleUpdateParameters class. + */ + public CacheRuleUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the cache rule update parameters. + * + * @return the innerProperties value. + */ + private CacheRuleUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().credentialSetResourceId(); + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleUpdateParameters object itself. + */ + public CacheRuleUpdateParameters withCredentialSetResourceId(String credentialSetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheRuleUpdateProperties(); + } + this.innerProperties().withCredentialSetResourceId(credentialSetResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheRuleUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheRuleUpdateParameters if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheRuleUpdateParameters. + */ + public static CacheRuleUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheRuleUpdateParameters deserializedCacheRuleUpdateParameters = new CacheRuleUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedCacheRuleUpdateParameters.innerProperties = CacheRuleUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheRuleUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java new file mode 100644 index 000000000000..5747664b6003 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 CacheRules. + */ +public interface CacheRules { + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, + Context context); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 properties of the specified cache rule resource. + */ + CacheRule get(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified cache rule resource. + * + * @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 properties of the specified cache rule resource along with {@link Response}. + */ + CacheRule getById(String id); + + /** + * Gets the properties of the specified cache rule resource. + * + * @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 properties of the specified cache rule resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a cache rule resource from a container registry. + * + * @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); + + /** + * Deletes a cache rule resource from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CacheRule resource. + * + * @param name resource name. + * @return the first stage of the new CacheRule definition. + */ + CacheRule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java new file mode 100644 index 000000000000..75f670218923 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; +import java.util.Map; + +/** + * An immutable client-side representation of CallbackConfig. + */ +public interface CallbackConfig { + /** + * Gets the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + String serviceUri(); + + /** + * Gets the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + Map customHeaders(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner object. + * + * @return the inner object. + */ + CallbackConfigInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java new file mode 100644 index 000000000000..f29e3c8de58b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of certificate location. + */ +public final class CertificateType extends ExpandableStringEnum { + /** + * Static value LocalDirectory for CertificateType. + */ + public static final CertificateType LOCAL_DIRECTORY = fromString("LocalDirectory"); + + /** + * Creates a new instance of CertificateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateType() { + } + + /** + * Creates or finds a CertificateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateType. + */ + public static CertificateType fromString(String name) { + return fromString(name, CertificateType.class); + } + + /** + * Gets known CertificateType values. + * + * @return known CertificateType values. + */ + public static Collection values() { + return values(CertificateType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java new file mode 100644 index 000000000000..130a1dddbd78 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 ConnectedRegistries. + */ +public interface ConnectedRegistries { + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context); + + /** + * Gets the properties of the connected registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 properties of the connected registry. + */ + ConnectedRegistry get(String resourceGroupName, String registryName, String connectedRegistryName); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 registryName, String connectedRegistryName); + + /** + * Deletes a connected registry from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName); + + /** + * Deactivates the connected registry instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param connectedRegistryName The name of the connected registry. + * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, Context context); + + /** + * Gets the properties of the connected registry. + * + * @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 properties of the connected registry along with {@link Response}. + */ + ConnectedRegistry getById(String id); + + /** + * Gets the properties of the connected registry. + * + * @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 properties of the connected registry along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a connected registry from a container registry. + * + * @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); + + /** + * Deletes a connected registry from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ConnectedRegistry resource. + * + * @param name resource name. + * @return the first stage of the new ConnectedRegistry definition. + */ + ConnectedRegistry.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java new file mode 100644 index 000000000000..95e4fb97f005 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; +import java.util.List; + +/** + * An immutable client-side representation of ConnectedRegistry. + */ +public interface ConnectedRegistry { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of the connected registry. + * + * @return the properties value. + */ + ConnectedRegistryProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner object. + * + * @return the inner object. + */ + ConnectedRegistryInner innerModel(); + + /** + * The entirety of the ConnectedRegistry definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ConnectedRegistry definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ConnectedRegistry definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ConnectedRegistry definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the ConnectedRegistry 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ConnectedRegistry create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ConnectedRegistry create(Context context); + } + + /** + * The stage of the ConnectedRegistry definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the connected registry.. + * + * @param properties The properties of the connected registry. + * @return the next definition stage. + */ + WithCreate withProperties(ConnectedRegistryProperties properties); + } + } + + /** + * Begins update for the ConnectedRegistry resource. + * + * @return the stage of resource update. + */ + ConnectedRegistry.Update update(); + + /** + * The template for ConnectedRegistry update. + */ + interface Update extends UpdateStages.WithSyncProperties, UpdateStages.WithLogging, UpdateStages.WithClientTokenIds, + UpdateStages.WithNotificationsList, UpdateStages.WithGarbageCollection { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ConnectedRegistry apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ConnectedRegistry apply(Context context); + } + + /** + * The ConnectedRegistry update stages. + */ + interface UpdateStages { + /** + * The stage of the ConnectedRegistry update allowing to specify syncProperties. + */ + interface WithSyncProperties { + /** + * Specifies the syncProperties property: The sync properties of the connected registry with its parent.. + * + * @param syncProperties The sync properties of the connected registry with its parent. + * @return the next definition stage. + */ + Update withSyncProperties(SyncUpdateProperties syncProperties); + } + + /** + * The stage of the ConnectedRegistry update allowing to specify logging. + */ + interface WithLogging { + /** + * Specifies the logging property: The logging properties of the connected registry.. + * + * @param logging The logging properties of the connected registry. + * @return the next definition stage. + */ + Update withLogging(LoggingProperties logging); + } + + /** + * The stage of the ConnectedRegistry update allowing to specify clientTokenIds. + */ + interface WithClientTokenIds { + /** + * Specifies the clientTokenIds property: The list of the ACR token resource IDs used to authenticate + * clients to the connected registry.. + * + * @param clientTokenIds The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * @return the next definition stage. + */ + Update withClientTokenIds(List clientTokenIds); + } + + /** + * The stage of the ConnectedRegistry update allowing to specify notificationsList. + */ + interface WithNotificationsList { + /** + * Specifies the notificationsList property: The list of notifications subscription information for the + * connected registry.. + * + * @param notificationsList The list of notifications subscription information for the connected registry. + * @return the next definition stage. + */ + Update withNotificationsList(List notificationsList); + } + + /** + * The stage of the ConnectedRegistry update allowing to specify garbageCollection. + */ + interface WithGarbageCollection { + /** + * Specifies the garbageCollection property: The garbage collection properties of the connected registry.. + * + * @param garbageCollection The garbage collection properties of the connected registry. + * @return the next definition stage. + */ + Update withGarbageCollection(GarbageCollectionProperties garbageCollection); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ConnectedRegistry refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ConnectedRegistry refresh(Context context); + + /** + * Deactivates the connected registry instance. + * + * @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 deactivate(); + + /** + * Deactivates the connected registry instance. + * + * @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 deactivate(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java new file mode 100644 index 000000000000..02c86718d4a9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The mode of the connected registry resource that indicates the permissions of the registry. + */ +public final class ConnectedRegistryMode extends ExpandableStringEnum { + /** + * Static value ReadWrite for ConnectedRegistryMode. + */ + public static final ConnectedRegistryMode READ_WRITE = fromString("ReadWrite"); + + /** + * Static value ReadOnly for ConnectedRegistryMode. + */ + public static final ConnectedRegistryMode READ_ONLY = fromString("ReadOnly"); + + /** + * Static value Registry for ConnectedRegistryMode. + */ + public static final ConnectedRegistryMode REGISTRY = fromString("Registry"); + + /** + * Static value Mirror for ConnectedRegistryMode. + */ + public static final ConnectedRegistryMode MIRROR = fromString("Mirror"); + + /** + * Creates a new instance of ConnectedRegistryMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectedRegistryMode() { + } + + /** + * Creates or finds a ConnectedRegistryMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectedRegistryMode. + */ + public static ConnectedRegistryMode fromString(String name) { + return fromString(name, ConnectedRegistryMode.class); + } + + /** + * Gets known ConnectedRegistryMode values. + * + * @return known ConnectedRegistryMode values. + */ + public static Collection values() { + return values(ConnectedRegistryMode.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java new file mode 100644 index 000000000000..449bef20cb72 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The properties of a connected registry. + */ +@Fluent +public final class ConnectedRegistryProperties implements JsonSerializable { + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * The mode of the connected registry resource that indicates the permissions of the registry. + */ + private ConnectedRegistryMode mode; + + /* + * The current version of ACR runtime on the connected registry. + */ + private String version; + + /* + * The current connection state of the connected registry. + */ + private ConnectionState connectionState; + + /* + * The last activity time of the connected registry. + */ + private OffsetDateTime lastActivityTime; + + /* + * The activation properties of the connected registry. + */ + private ActivationProperties activation; + + /* + * The parent of the connected registry. + */ + private ParentProperties parent; + + /* + * The list of the ACR token resource IDs used to authenticate clients to the connected registry. + */ + private List clientTokenIds; + + /* + * The login server properties of the connected registry. + */ + private LoginServerProperties loginServer; + + /* + * The logging properties of the connected registry. + */ + private LoggingProperties logging; + + /* + * The list of current statuses of the connected registry. + */ + private List statusDetails; + + /* + * The list of notifications subscription information for the connected registry. + */ + private List notificationsList; + + /* + * The garbage collection properties of the connected registry. + */ + private GarbageCollectionProperties garbageCollection; + + /** + * Creates an instance of ConnectedRegistryProperties class. + */ + public ConnectedRegistryProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the mode property: The mode of the connected registry resource that indicates the permissions of the + * registry. + * + * @return the mode value. + */ + public ConnectedRegistryMode mode() { + return this.mode; + } + + /** + * Set the mode property: The mode of the connected registry resource that indicates the permissions of the + * registry. + * + * @param mode the mode value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withMode(ConnectedRegistryMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the version property: The current version of ACR runtime on the connected registry. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the connectionState property: The current connection state of the connected registry. + * + * @return the connectionState value. + */ + public ConnectionState connectionState() { + return this.connectionState; + } + + /** + * Get the lastActivityTime property: The last activity time of the connected registry. + * + * @return the lastActivityTime value. + */ + public OffsetDateTime lastActivityTime() { + return this.lastActivityTime; + } + + /** + * Get the activation property: The activation properties of the connected registry. + * + * @return the activation value. + */ + public ActivationProperties activation() { + return this.activation; + } + + /** + * Get the parent property: The parent of the connected registry. + * + * @return the parent value. + */ + public ParentProperties parent() { + return this.parent; + } + + /** + * Set the parent property: The parent of the connected registry. + * + * @param parent the parent value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withParent(ParentProperties parent) { + this.parent = parent; + return this; + } + + /** + * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @return the clientTokenIds value. + */ + public List clientTokenIds() { + return this.clientTokenIds; + } + + /** + * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @param clientTokenIds the clientTokenIds value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withClientTokenIds(List clientTokenIds) { + this.clientTokenIds = clientTokenIds; + return this; + } + + /** + * Get the loginServer property: The login server properties of the connected registry. + * + * @return the loginServer value. + */ + public LoginServerProperties loginServer() { + return this.loginServer; + } + + /** + * Set the loginServer property: The login server properties of the connected registry. + * + * @param loginServer the loginServer value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withLoginServer(LoginServerProperties loginServer) { + this.loginServer = loginServer; + return this; + } + + /** + * Get the logging property: The logging properties of the connected registry. + * + * @return the logging value. + */ + public LoggingProperties logging() { + return this.logging; + } + + /** + * Set the logging property: The logging properties of the connected registry. + * + * @param logging the logging value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withLogging(LoggingProperties logging) { + this.logging = logging; + return this; + } + + /** + * Get the statusDetails property: The list of current statuses of the connected registry. + * + * @return the statusDetails value. + */ + public List statusDetails() { + return this.statusDetails; + } + + /** + * Get the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @return the notificationsList value. + */ + public List notificationsList() { + return this.notificationsList; + } + + /** + * Set the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @param notificationsList the notificationsList value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withNotificationsList(List notificationsList) { + this.notificationsList = notificationsList; + return this; + } + + /** + * Get the garbageCollection property: The garbage collection properties of the connected registry. + * + * @return the garbageCollection value. + */ + public GarbageCollectionProperties garbageCollection() { + return this.garbageCollection; + } + + /** + * Set the garbageCollection property: The garbage collection properties of the connected registry. + * + * @param garbageCollection the garbageCollection value to set. + * @return the ConnectedRegistryProperties object itself. + */ + public ConnectedRegistryProperties withGarbageCollection(GarbageCollectionProperties garbageCollection) { + this.garbageCollection = garbageCollection; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("parent", this.parent); + jsonWriter.writeArrayField("clientTokenIds", this.clientTokenIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("loginServer", this.loginServer); + jsonWriter.writeJsonField("logging", this.logging); + jsonWriter.writeArrayField("notificationsList", this.notificationsList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("garbageCollection", this.garbageCollection); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedRegistryProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedRegistryProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedRegistryProperties. + */ + public static ConnectedRegistryProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedRegistryProperties deserializedConnectedRegistryProperties = new ConnectedRegistryProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedConnectedRegistryProperties.mode = ConnectedRegistryMode.fromString(reader.getString()); + } else if ("parent".equals(fieldName)) { + deserializedConnectedRegistryProperties.parent = ParentProperties.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedConnectedRegistryProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("version".equals(fieldName)) { + deserializedConnectedRegistryProperties.version = reader.getString(); + } else if ("connectionState".equals(fieldName)) { + deserializedConnectedRegistryProperties.connectionState + = ConnectionState.fromString(reader.getString()); + } else if ("lastActivityTime".equals(fieldName)) { + deserializedConnectedRegistryProperties.lastActivityTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("activation".equals(fieldName)) { + deserializedConnectedRegistryProperties.activation = ActivationProperties.fromJson(reader); + } else if ("clientTokenIds".equals(fieldName)) { + List clientTokenIds = reader.readArray(reader1 -> reader1.getString()); + deserializedConnectedRegistryProperties.clientTokenIds = clientTokenIds; + } else if ("loginServer".equals(fieldName)) { + deserializedConnectedRegistryProperties.loginServer = LoginServerProperties.fromJson(reader); + } else if ("logging".equals(fieldName)) { + deserializedConnectedRegistryProperties.logging = LoggingProperties.fromJson(reader); + } else if ("statusDetails".equals(fieldName)) { + List statusDetails + = reader.readArray(reader1 -> StatusDetailProperties.fromJson(reader1)); + deserializedConnectedRegistryProperties.statusDetails = statusDetails; + } else if ("notificationsList".equals(fieldName)) { + List notificationsList = reader.readArray(reader1 -> reader1.getString()); + deserializedConnectedRegistryProperties.notificationsList = notificationsList; + } else if ("garbageCollection".equals(fieldName)) { + deserializedConnectedRegistryProperties.garbageCollection + = GarbageCollectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedRegistryProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java new file mode 100644 index 000000000000..c6a389728e8c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties; +import java.io.IOException; +import java.util.List; + +/** + * The parameters for updating a connected registry. + */ +@Fluent +public final class ConnectedRegistryUpdateParameters implements JsonSerializable { + /* + * The properties of the connected registry update parameters. + */ + private ConnectedRegistryUpdateProperties innerProperties; + + /** + * Creates an instance of ConnectedRegistryUpdateParameters class. + */ + public ConnectedRegistryUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the connected registry update parameters. + * + * @return the innerProperties value. + */ + private ConnectedRegistryUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the syncProperties property: The sync properties of the connected registry with its parent. + * + * @return the syncProperties value. + */ + public SyncUpdateProperties syncProperties() { + return this.innerProperties() == null ? null : this.innerProperties().syncProperties(); + } + + /** + * Set the syncProperties property: The sync properties of the connected registry with its parent. + * + * @param syncProperties the syncProperties value to set. + * @return the ConnectedRegistryUpdateParameters object itself. + */ + public ConnectedRegistryUpdateParameters withSyncProperties(SyncUpdateProperties syncProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryUpdateProperties(); + } + this.innerProperties().withSyncProperties(syncProperties); + return this; + } + + /** + * Get the logging property: The logging properties of the connected registry. + * + * @return the logging value. + */ + public LoggingProperties logging() { + return this.innerProperties() == null ? null : this.innerProperties().logging(); + } + + /** + * Set the logging property: The logging properties of the connected registry. + * + * @param logging the logging value to set. + * @return the ConnectedRegistryUpdateParameters object itself. + */ + public ConnectedRegistryUpdateParameters withLogging(LoggingProperties logging) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryUpdateProperties(); + } + this.innerProperties().withLogging(logging); + return this; + } + + /** + * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @return the clientTokenIds value. + */ + public List clientTokenIds() { + return this.innerProperties() == null ? null : this.innerProperties().clientTokenIds(); + } + + /** + * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the + * connected registry. + * + * @param clientTokenIds the clientTokenIds value to set. + * @return the ConnectedRegistryUpdateParameters object itself. + */ + public ConnectedRegistryUpdateParameters withClientTokenIds(List clientTokenIds) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryUpdateProperties(); + } + this.innerProperties().withClientTokenIds(clientTokenIds); + return this; + } + + /** + * Get the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @return the notificationsList value. + */ + public List notificationsList() { + return this.innerProperties() == null ? null : this.innerProperties().notificationsList(); + } + + /** + * Set the notificationsList property: The list of notifications subscription information for the connected + * registry. + * + * @param notificationsList the notificationsList value to set. + * @return the ConnectedRegistryUpdateParameters object itself. + */ + public ConnectedRegistryUpdateParameters withNotificationsList(List notificationsList) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryUpdateProperties(); + } + this.innerProperties().withNotificationsList(notificationsList); + return this; + } + + /** + * Get the garbageCollection property: The garbage collection properties of the connected registry. + * + * @return the garbageCollection value. + */ + public GarbageCollectionProperties garbageCollection() { + return this.innerProperties() == null ? null : this.innerProperties().garbageCollection(); + } + + /** + * Set the garbageCollection property: The garbage collection properties of the connected registry. + * + * @param garbageCollection the garbageCollection value to set. + * @return the ConnectedRegistryUpdateParameters object itself. + */ + public ConnectedRegistryUpdateParameters withGarbageCollection(GarbageCollectionProperties garbageCollection) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryUpdateProperties(); + } + this.innerProperties().withGarbageCollection(garbageCollection); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedRegistryUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedRegistryUpdateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedRegistryUpdateParameters. + */ + public static ConnectedRegistryUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedRegistryUpdateParameters deserializedConnectedRegistryUpdateParameters + = new ConnectedRegistryUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedConnectedRegistryUpdateParameters.innerProperties + = ConnectedRegistryUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedRegistryUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java new file mode 100644 index 000000000000..007645bd9f62 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current connection state of the connected registry. + */ +public final class ConnectionState extends ExpandableStringEnum { + /** + * Static value Online for ConnectionState. + */ + public static final ConnectionState ONLINE = fromString("Online"); + + /** + * Static value Offline for ConnectionState. + */ + public static final ConnectionState OFFLINE = fromString("Offline"); + + /** + * Static value Syncing for ConnectionState. + */ + public static final ConnectionState SYNCING = fromString("Syncing"); + + /** + * Static value Unhealthy for ConnectionState. + */ + public static final ConnectionState UNHEALTHY = fromString("Unhealthy"); + + /** + * Creates a new instance of ConnectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionState() { + } + + /** + * Creates or finds a ConnectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectionState. + */ + public static ConnectionState fromString(String name) { + return fromString(name, ConnectionState.class); + } + + /** + * Gets known ConnectionState values. + * + * @return known ConnectionState values. + */ + public static Collection values() { + return values(ConnectionState.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java new file mode 100644 index 000000000000..2319a504fc84 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The private link service connection status. + */ +public final class ConnectionStatus extends ExpandableStringEnum { + /** + * Static value Approved for ConnectionStatus. + */ + public static final ConnectionStatus APPROVED = fromString("Approved"); + + /** + * Static value Pending for ConnectionStatus. + */ + public static final ConnectionStatus PENDING = fromString("Pending"); + + /** + * Static value Rejected for ConnectionStatus. + */ + public static final ConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Static value Disconnected for ConnectionStatus. + */ + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of ConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionStatus() { + } + + /** + * Creates or finds a ConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectionStatus. + */ + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); + } + + /** + * Gets known ConnectionStatus values. + * + * @return known ConnectionStatus values. + */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java new file mode 100644 index 000000000000..cba709b1d788 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +/** + * The resource type for Container Registry. + */ +public enum ContainerRegistryResourceType { + /** + * Enum value Microsoft.ContainerRegistry/registries. + */ + MICROSOFT_CONTAINER_REGISTRY_REGISTRIES("Microsoft.ContainerRegistry/registries"); + + /** + * The actual serialized value for a ContainerRegistryResourceType instance. + */ + private final String value; + + ContainerRegistryResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ContainerRegistryResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed ContainerRegistryResourceType object, or null if unable to parse. + */ + public static ContainerRegistryResourceType fromString(String value) { + if (value == null) { + return null; + } + ContainerRegistryResourceType[] items = ContainerRegistryResourceType.values(); + for (ContainerRegistryResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java new file mode 100644 index 000000000000..3f624dd89638 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The health of the auth credential. + */ +@Immutable +public final class CredentialHealth implements JsonSerializable { + /* + * The health status of credential. + */ + private CredentialHealthStatus status; + + /* + * Error code representing the health check error. + */ + private String errorCode; + + /* + * Descriptive message representing the health check error. + */ + private String errorMessage; + + /** + * Creates an instance of CredentialHealth class. + */ + private CredentialHealth() { + } + + /** + * Get the status property: The health status of credential. + * + * @return the status value. + */ + public CredentialHealthStatus status() { + return this.status; + } + + /** + * Get the errorCode property: Error code representing the health check error. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive message representing the health check error. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialHealth from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialHealth if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CredentialHealth. + */ + public static CredentialHealth fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialHealth deserializedCredentialHealth = new CredentialHealth(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCredentialHealth.status = CredentialHealthStatus.fromString(reader.getString()); + } else if ("errorCode".equals(fieldName)) { + deserializedCredentialHealth.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedCredentialHealth.errorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialHealth; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java new file mode 100644 index 000000000000..fb2b925efc13 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The health status of credential. + */ +public final class CredentialHealthStatus extends ExpandableStringEnum { + /** + * Static value Healthy for CredentialHealthStatus. + */ + public static final CredentialHealthStatus HEALTHY = fromString("Healthy"); + + /** + * Static value Unhealthy for CredentialHealthStatus. + */ + public static final CredentialHealthStatus UNHEALTHY = fromString("Unhealthy"); + + /** + * Creates a new instance of CredentialHealthStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialHealthStatus() { + } + + /** + * Creates or finds a CredentialHealthStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialHealthStatus. + */ + public static CredentialHealthStatus fromString(String name) { + return fromString(name, CredentialHealthStatus.class); + } + + /** + * Gets known CredentialHealthStatus values. + * + * @return known CredentialHealthStatus values. + */ + public static Collection values() { + return values(CredentialHealthStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java new file mode 100644 index 000000000000..1c7d68abc335 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The name of the credential. + */ +public final class CredentialName extends ExpandableStringEnum { + /** + * Static value Credential1 for CredentialName. + */ + public static final CredentialName CREDENTIAL1 = fromString("Credential1"); + + /** + * Creates a new instance of CredentialName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialName() { + } + + /** + * Creates or finds a CredentialName from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialName. + */ + public static CredentialName fromString(String name) { + return fromString(name, CredentialName.class); + } + + /** + * Gets known CredentialName values. + * + * @return known CredentialName values. + */ + public static Collection values() { + return values(CredentialName.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java new file mode 100644 index 000000000000..5ceaf092612d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; +import java.util.List; + +/** + * An immutable client-side representation of CredentialSet. + */ +public interface CredentialSet { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of the credential set. + * + * @return the properties value. + */ + CredentialSetProperties properties(); + + /** + * Gets the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @return the identity value. + */ + IdentityProperties identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner object. + * + * @return the inner object. + */ + CredentialSetInner innerModel(); + + /** + * The entirety of the CredentialSet definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The CredentialSet definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CredentialSet definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the CredentialSet definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the CredentialSet 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.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + CredentialSet create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CredentialSet create(Context context); + } + + /** + * The stage of the CredentialSet definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the credential set.. + * + * @param properties The properties of the credential set. + * @return the next definition stage. + */ + WithCreate withProperties(CredentialSetProperties properties); + } + + /** + * The stage of the CredentialSet definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Identities associated with the resource. This is used to access the + * KeyVault secrets.. + * + * @param identity Identities associated with the resource. This is used to access the KeyVault secrets. + * @return the next definition stage. + */ + WithCreate withIdentity(IdentityProperties identity); + } + } + + /** + * Begins update for the CredentialSet resource. + * + * @return the stage of resource update. + */ + CredentialSet.Update update(); + + /** + * The template for CredentialSet update. + */ + interface Update extends UpdateStages.WithIdentity, UpdateStages.WithAuthCredentials { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CredentialSet apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CredentialSet apply(Context context); + } + + /** + * The CredentialSet update stages. + */ + interface UpdateStages { + /** + * The stage of the CredentialSet update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Identities associated with the resource. This is used to access the + * KeyVault secrets.. + * + * @param identity Identities associated with the resource. This is used to access the KeyVault secrets. + * @return the next definition stage. + */ + Update withIdentity(IdentityProperties identity); + } + + /** + * The stage of the CredentialSet update allowing to specify authCredentials. + */ + interface WithAuthCredentials { + /** + * Specifies the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential.. + * + * @param authCredentials List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * @return the next definition stage. + */ + Update withAuthCredentials(List authCredentials); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CredentialSet refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CredentialSet refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java new file mode 100644 index 000000000000..14dc2d558a53 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The properties of a credential set resource. + */ +@Fluent +public final class CredentialSetProperties implements JsonSerializable { + /* + * The credentials are stored for this upstream or login server. + */ + private String loginServer; + + /* + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + private List authCredentials; + + /* + * The creation date of credential store resource. + */ + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of CredentialSetProperties class. + */ + public CredentialSetProperties() { + } + + /** + * Get the loginServer property: The credentials are stored for this upstream or login server. + * + * @return the loginServer value. + */ + public String loginServer() { + return this.loginServer; + } + + /** + * Set the loginServer property: The credentials are stored for this upstream or login server. + * + * @param loginServer the loginServer value to set. + * @return the CredentialSetProperties object itself. + */ + public CredentialSetProperties withLoginServer(String loginServer) { + this.loginServer = loginServer; + return this; + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.authCredentials; + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetProperties object itself. + */ + public CredentialSetProperties withAuthCredentials(List authCredentials) { + this.authCredentials = authCredentials; + return this; + } + + /** + * Get the creationDate property: The creation date of credential store resource. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("loginServer", this.loginServer); + jsonWriter.writeArrayField("authCredentials", this.authCredentials, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialSetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialSetProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CredentialSetProperties. + */ + public static CredentialSetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialSetProperties deserializedCredentialSetProperties = new CredentialSetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loginServer".equals(fieldName)) { + deserializedCredentialSetProperties.loginServer = reader.getString(); + } else if ("authCredentials".equals(fieldName)) { + List authCredentials + = reader.readArray(reader1 -> AuthCredential.fromJson(reader1)); + deserializedCredentialSetProperties.authCredentials = authCredentials; + } else if ("creationDate".equals(fieldName)) { + deserializedCredentialSetProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedCredentialSetProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialSetProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java new file mode 100644 index 000000000000..ab5bf2e66a38 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties; +import java.io.IOException; +import java.util.List; + +/** + * The parameters for updating a credential set. + */ +@Fluent +public final class CredentialSetUpdateParameters implements JsonSerializable { + /* + * The properties of the credential set update parameters + */ + private CredentialSetUpdateProperties innerProperties; + + /* + * Identities associated with the resource. This is used to access the KeyVault secrets. + */ + private IdentityProperties identity; + + /** + * Creates an instance of CredentialSetUpdateParameters class. + */ + public CredentialSetUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the credential set update parameters. + * + * @return the innerProperties value. + */ + private CredentialSetUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @param identity the identity value to set. + * @return the CredentialSetUpdateParameters object itself. + */ + public CredentialSetUpdateParameters withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.innerProperties() == null ? null : this.innerProperties().authCredentials(); + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetUpdateParameters object itself. + */ + public CredentialSetUpdateParameters withAuthCredentials(List authCredentials) { + if (this.innerProperties() == null) { + this.innerProperties = new CredentialSetUpdateProperties(); + } + this.innerProperties().withAuthCredentials(authCredentials); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialSetUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialSetUpdateParameters if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CredentialSetUpdateParameters. + */ + public static CredentialSetUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialSetUpdateParameters deserializedCredentialSetUpdateParameters + = new CredentialSetUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedCredentialSetUpdateParameters.innerProperties + = CredentialSetUpdateProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedCredentialSetUpdateParameters.identity = IdentityProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialSetUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java new file mode 100644 index 000000000000..c22101741e5b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 CredentialSets. + */ +public interface CredentialSets { + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String credentialSetName, + Context context); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 properties of the specified credential set resource. + */ + CredentialSet get(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified credential set resource. + * + * @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 properties of the specified credential set resource along with {@link Response}. + */ + CredentialSet getById(String id); + + /** + * Gets the properties of the specified credential set resource. + * + * @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 properties of the specified credential set resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a credential set from a container registry. + * + * @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); + + /** + * Deletes a credential set from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CredentialSet resource. + * + * @param name resource name. + * @return the first stage of the new CredentialSet definition. + */ + CredentialSet.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java new file mode 100644 index 000000000000..05f32ea9c287 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The default action of allow or deny when no other rules match. + */ +public final class DefaultAction extends ExpandableStringEnum { + /** + * Static value Allow for DefaultAction. + */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** + * Static value Deny for DefaultAction. + */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates a new instance of DefaultAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultAction() { + } + + /** + * Creates or finds a DefaultAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultAction. + */ + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** + * Gets known DefaultAction values. + * + * @return known DefaultAction values. + */ + public static Collection values() { + return values(DefaultAction.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java new file mode 100644 index 000000000000..c75e01bd687a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EncryptionProperty model. + */ +@Fluent +public final class EncryptionProperty implements JsonSerializable { + /* + * Indicates whether or not the encryption is enabled for container registry. + */ + private EncryptionStatus status; + + /* + * Key vault properties. + */ + private KeyVaultProperties keyVaultProperties; + + /** + * Creates an instance of EncryptionProperty class. + */ + public EncryptionProperty() { + } + + /** + * Get the status property: Indicates whether or not the encryption is enabled for container registry. + * + * @return the status value. + */ + public EncryptionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether or not the encryption is enabled for container registry. + * + * @param status the status value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withStatus(EncryptionStatus status) { + this.status = status; + return this; + } + + /** + * Get the keyVaultProperties property: Key vault properties. + * + * @return the keyVaultProperties value. + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Key vault properties. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionProperty if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EncryptionProperty. + */ + public static EncryptionProperty fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionProperty deserializedEncryptionProperty = new EncryptionProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedEncryptionProperty.status = EncryptionStatus.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedEncryptionProperty.keyVaultProperties = KeyVaultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionProperty; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java new file mode 100644 index 000000000000..01453fe363b3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether or not the encryption is enabled for container registry. + */ +public final class EncryptionStatus extends ExpandableStringEnum { + /** + * Static value enabled for EncryptionStatus. + */ + public static final EncryptionStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for EncryptionStatus. + */ + public static final EncryptionStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of EncryptionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionStatus() { + } + + /** + * Creates or finds a EncryptionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionStatus. + */ + public static EncryptionStatus fromString(String name) { + return fromString(name, EncryptionStatus.class); + } + + /** + * Gets known EncryptionStatus values. + * + * @return known EncryptionStatus values. + */ + public static Collection values() { + return values(EncryptionStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java new file mode 100644 index 000000000000..bb37f340847b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; + +/** + * An immutable client-side representation of Event. + */ +public interface Event { + /** + * Gets the id property: The event ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the eventRequestMessage property: The event request message sent to the service URI. + * + * @return the eventRequestMessage value. + */ + EventRequestMessage eventRequestMessage(); + + /** + * Gets the eventResponseMessage property: The event response message received from the service URI. + * + * @return the eventResponseMessage value. + */ + EventResponseMessage eventResponseMessage(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner object. + * + * @return the inner object. + */ + EventInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java new file mode 100644 index 000000000000..6978909f30d5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The content of the event request message. + */ +@Immutable +public final class EventContent implements JsonSerializable { + /* + * The event ID. + */ + private String id; + + /* + * The time at which the event occurred. + */ + private OffsetDateTime timestamp; + + /* + * The action that encompasses the provided event. + */ + private String action; + + /* + * The target of the event. + */ + private Target target; + + /* + * The request that generated the event. + */ + private Request request; + + /* + * The agent that initiated the event. For most situations, this could be from the authorization context of the + * request. + */ + private Actor actor; + + /* + * The registry node that generated the event. Put differently, while the actor initiates the event, the source + * generates it. + */ + private Source source; + + /** + * Creates an instance of EventContent class. + */ + private EventContent() { + } + + /** + * Get the id property: The event ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the timestamp property: The time at which the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Get the action property: The action that encompasses the provided event. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Get the target property: The target of the event. + * + * @return the target value. + */ + public Target target() { + return this.target; + } + + /** + * Get the request property: The request that generated the event. + * + * @return the request value. + */ + public Request request() { + return this.request; + } + + /** + * Get the actor property: The agent that initiated the event. For most situations, this could be from the + * authorization context of the request. + * + * @return the actor value. + */ + public Actor actor() { + return this.actor; + } + + /** + * Get the source property: The registry node that generated the event. Put differently, while the actor initiates + * the event, the source generates it. + * + * @return the source value. + */ + public Source source() { + return this.source; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + jsonWriter.writeStringField("action", this.action); + jsonWriter.writeJsonField("target", this.target); + jsonWriter.writeJsonField("request", this.request); + jsonWriter.writeJsonField("actor", this.actor); + jsonWriter.writeJsonField("source", this.source); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventContent if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EventContent. + */ + public static EventContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventContent deserializedEventContent = new EventContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventContent.id = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedEventContent.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("action".equals(fieldName)) { + deserializedEventContent.action = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedEventContent.target = Target.fromJson(reader); + } else if ("request".equals(fieldName)) { + deserializedEventContent.request = Request.fromJson(reader); + } else if ("actor".equals(fieldName)) { + deserializedEventContent.actor = Actor.fromJson(reader); + } else if ("source".equals(fieldName)) { + deserializedEventContent.source = Source.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEventContent; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java new file mode 100644 index 000000000000..c1e265934078 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; + +/** + * An immutable client-side representation of EventInfo. + */ +public interface EventInfo { + /** + * Gets the id property: The event ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner object. + * + * @return the inner object. + */ + EventInfoInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java new file mode 100644 index 000000000000..eec3e6e10f48 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The event request message sent to the service URI. + */ +@Immutable +public final class EventRequestMessage implements JsonSerializable { + /* + * The content of the event request message. + */ + private EventContent content; + + /* + * The headers of the event request message. + */ + private Map headers; + + /* + * The HTTP method used to send the event request message. + */ + private String method; + + /* + * The URI used to send the event request message. + */ + private String requestUri; + + /* + * The HTTP message version. + */ + private String version; + + /** + * Creates an instance of EventRequestMessage class. + */ + private EventRequestMessage() { + } + + /** + * Get the content property: The content of the event request message. + * + * @return the content value. + */ + public EventContent content() { + return this.content; + } + + /** + * Get the headers property: The headers of the event request message. + * + * @return the headers value. + */ + public Map headers() { + return this.headers; + } + + /** + * Get the method property: The HTTP method used to send the event request message. + * + * @return the method value. + */ + public String method() { + return this.method; + } + + /** + * Get the requestUri property: The URI used to send the event request message. + * + * @return the requestUri value. + */ + public String requestUri() { + return this.requestUri; + } + + /** + * Get the version property: The HTTP message version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("content", this.content); + jsonWriter.writeMapField("headers", this.headers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("method", this.method); + jsonWriter.writeStringField("requestUri", this.requestUri); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventRequestMessage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventRequestMessage if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EventRequestMessage. + */ + public static EventRequestMessage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventRequestMessage deserializedEventRequestMessage = new EventRequestMessage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedEventRequestMessage.content = EventContent.fromJson(reader); + } else if ("headers".equals(fieldName)) { + Map headers = reader.readMap(reader1 -> reader1.getString()); + deserializedEventRequestMessage.headers = headers; + } else if ("method".equals(fieldName)) { + deserializedEventRequestMessage.method = reader.getString(); + } else if ("requestUri".equals(fieldName)) { + deserializedEventRequestMessage.requestUri = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedEventRequestMessage.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventRequestMessage; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java new file mode 100644 index 000000000000..1b9bd9137873 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The event response message received from the service URI. + */ +@Immutable +public final class EventResponseMessage implements JsonSerializable { + /* + * The content of the event response message. + */ + private String content; + + /* + * The headers of the event response message. + */ + private Map headers; + + /* + * The reason phrase of the event response message. + */ + private String reasonPhrase; + + /* + * The status code of the event response message. + */ + private String statusCode; + + /* + * The HTTP message version. + */ + private String version; + + /** + * Creates an instance of EventResponseMessage class. + */ + private EventResponseMessage() { + } + + /** + * Get the content property: The content of the event response message. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Get the headers property: The headers of the event response message. + * + * @return the headers value. + */ + public Map headers() { + return this.headers; + } + + /** + * Get the reasonPhrase property: The reason phrase of the event response message. + * + * @return the reasonPhrase value. + */ + public String reasonPhrase() { + return this.reasonPhrase; + } + + /** + * Get the statusCode property: The status code of the event response message. + * + * @return the statusCode value. + */ + public String statusCode() { + return this.statusCode; + } + + /** + * Get the version property: The HTTP message version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("content", this.content); + jsonWriter.writeMapField("headers", this.headers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("reasonPhrase", this.reasonPhrase); + jsonWriter.writeStringField("statusCode", this.statusCode); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventResponseMessage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventResponseMessage if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the EventResponseMessage. + */ + public static EventResponseMessage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventResponseMessage deserializedEventResponseMessage = new EventResponseMessage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedEventResponseMessage.content = reader.getString(); + } else if ("headers".equals(fieldName)) { + Map headers = reader.readMap(reader1 -> reader1.getString()); + deserializedEventResponseMessage.headers = headers; + } else if ("reasonPhrase".equals(fieldName)) { + deserializedEventResponseMessage.reasonPhrase = reader.getString(); + } else if ("statusCode".equals(fieldName)) { + deserializedEventResponseMessage.statusCode = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedEventResponseMessage.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventResponseMessage; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java new file mode 100644 index 000000000000..51f6f0d0416d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The export policy for a container registry. + */ +@Fluent +public final class ExportPolicy implements JsonSerializable { + /* + * The value that indicates whether the policy is enabled or not. + */ + private ExportPolicyStatus status; + + /** + * Creates an instance of ExportPolicy class. + */ + public ExportPolicy() { + } + + /** + * Get the status property: The value that indicates whether the policy is enabled or not. + * + * @return the status value. + */ + public ExportPolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The value that indicates whether the policy is enabled or not. + * + * @param status the status value to set. + * @return the ExportPolicy object itself. + */ + public ExportPolicy withStatus(ExportPolicyStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportPolicy. + */ + public static ExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPolicy deserializedExportPolicy = new ExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedExportPolicy.status = ExportPolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java new file mode 100644 index 000000000000..cc93593e30f0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The value that indicates whether the policy is enabled or not. + */ +public final class ExportPolicyStatus extends ExpandableStringEnum { + /** + * Static value enabled for ExportPolicyStatus. + */ + public static final ExportPolicyStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for ExportPolicyStatus. + */ + public static final ExportPolicyStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of ExportPolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExportPolicyStatus() { + } + + /** + * Creates or finds a ExportPolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExportPolicyStatus. + */ + public static ExportPolicyStatus fromString(String name) { + return fromString(name, ExportPolicyStatus.class); + } + + /** + * Gets known ExportPolicyStatus values. + * + * @return known ExportPolicyStatus values. + */ + public static Collection values() { + return values(ExportPolicyStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java new file mode 100644 index 000000000000..039587ceb234 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The garbage collection properties of the connected registry. + */ +@Fluent +public final class GarbageCollectionProperties implements JsonSerializable { + /* + * Indicates whether garbage collection is enabled for the connected registry. + */ + private Boolean enabled; + + /* + * The cron expression indicating the schedule that the connected registry will run garbage collection. + */ + private String schedule; + + /** + * Creates an instance of GarbageCollectionProperties class. + */ + public GarbageCollectionProperties() { + } + + /** + * Get the enabled property: Indicates whether garbage collection is enabled for the connected registry. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether garbage collection is enabled for the connected registry. + * + * @param enabled the enabled value to set. + * @return the GarbageCollectionProperties object itself. + */ + public GarbageCollectionProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the schedule property: The cron expression indicating the schedule that the connected registry will run + * garbage collection. + * + * @return the schedule value. + */ + public String schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The cron expression indicating the schedule that the connected registry will run + * garbage collection. + * + * @param schedule the schedule value to set. + * @return the GarbageCollectionProperties object itself. + */ + public GarbageCollectionProperties withSchedule(String schedule) { + this.schedule = schedule; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("schedule", this.schedule); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GarbageCollectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GarbageCollectionProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GarbageCollectionProperties. + */ + public static GarbageCollectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GarbageCollectionProperties deserializedGarbageCollectionProperties = new GarbageCollectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedGarbageCollectionProperties.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("schedule".equals(fieldName)) { + deserializedGarbageCollectionProperties.schedule = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGarbageCollectionProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java new file mode 100644 index 000000000000..c88877f1d202 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The parameters used to generate credentials for a specified token or user of a container registry. + */ +@Fluent +public final class GenerateCredentialsParameters implements JsonSerializable { + /* + * The resource ID of the token for which credentials have to be generated. + */ + private String tokenId; + + /* + * The expiry date of the generated credentials after which the credentials become invalid. + */ + private OffsetDateTime expiry; + + /* + * Specifies name of the password which should be regenerated if any -- password1 or password2. + */ + private TokenPasswordName name; + + /** + * Creates an instance of GenerateCredentialsParameters class. + */ + public GenerateCredentialsParameters() { + } + + /** + * Get the tokenId property: The resource ID of the token for which credentials have to be generated. + * + * @return the tokenId value. + */ + public String tokenId() { + return this.tokenId; + } + + /** + * Set the tokenId property: The resource ID of the token for which credentials have to be generated. + * + * @param tokenId the tokenId value to set. + * @return the GenerateCredentialsParameters object itself. + */ + public GenerateCredentialsParameters withTokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + /** + * Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid. + * + * @return the expiry value. + */ + public OffsetDateTime expiry() { + return this.expiry; + } + + /** + * Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid. + * + * @param expiry the expiry value to set. + * @return the GenerateCredentialsParameters object itself. + */ + public GenerateCredentialsParameters withExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Get the name property: Specifies name of the password which should be regenerated if any -- password1 or + * password2. + * + * @return the name value. + */ + public TokenPasswordName name() { + return this.name; + } + + /** + * Set the name property: Specifies name of the password which should be regenerated if any -- password1 or + * password2. + * + * @param name the name value to set. + * @return the GenerateCredentialsParameters object itself. + */ + public GenerateCredentialsParameters withName(TokenPasswordName name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tokenId", this.tokenId); + jsonWriter.writeStringField("expiry", + this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GenerateCredentialsParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GenerateCredentialsParameters if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GenerateCredentialsParameters. + */ + public static GenerateCredentialsParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GenerateCredentialsParameters deserializedGenerateCredentialsParameters + = new GenerateCredentialsParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tokenId".equals(fieldName)) { + deserializedGenerateCredentialsParameters.tokenId = reader.getString(); + } else if ("expiry".equals(fieldName)) { + deserializedGenerateCredentialsParameters.expiry = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedGenerateCredentialsParameters.name = TokenPasswordName.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGenerateCredentialsParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java new file mode 100644 index 000000000000..248e3aceacc5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; +import java.util.List; + +/** + * An immutable client-side representation of GenerateCredentialsResult. + */ +public interface GenerateCredentialsResult { + /** + * Gets the username property: The username for a container registry. + * + * @return the username value. + */ + String username(); + + /** + * Gets the passwords property: The list of passwords for a container registry. + * + * @return the passwords value. + */ + List passwords(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner + * object. + * + * @return the inner object. + */ + GenerateCredentialsResultInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java new file mode 100644 index 000000000000..c045b5e2d35c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IP rule with specific IP or IP range in CIDR format. + */ +@Fluent +public final class IPRule implements JsonSerializable { + /* + * The action of IP ACL rule. + */ + private Action action; + + /* + * Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + */ + private String iPAddressOrRange; + + /** + * Creates an instance of IPRule class. + */ + public IPRule() { + } + + /** + * Get the action property: The action of IP ACL rule. + * + * @return the action value. + */ + public Action action() { + return this.action; + } + + /** + * Set the action property: The action of IP ACL rule. + * + * @param action the action value to set. + * @return the IPRule object itself. + */ + public IPRule withAction(Action action) { + this.action = action; + return this; + } + + /** + * Get the iPAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @return the iPAddressOrRange value. + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set the iPAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + * + * @param iPAddressOrRange the iPAddressOrRange value to set. + * @return the IPRule object itself. + */ + public IPRule withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.iPAddressOrRange); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPRule if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IPRule. + */ + public static IPRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPRule deserializedIPRule = new IPRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedIPRule.iPAddressOrRange = reader.getString(); + } else if ("action".equals(fieldName)) { + deserializedIPRule.action = Action.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIPRule; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java new file mode 100644 index 000000000000..ca93b58cf293 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Managed identity for the resource. + */ +@Fluent +public final class IdentityProperties implements JsonSerializable { + /* + * The principal ID of resource identity. + */ + private String principalId; + + /* + * The tenant ID of resource. + */ + private String tenantId; + + /* + * The identity type. + */ + private ResourceIdentityType type; + + /* + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of IdentityProperties class. + */ + public IdentityProperties() { + } + + /** + * Get the principalId property: The principal ID of resource identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The identity type. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The identity type. + * + * @param type the type value to set. + * @return the IdentityProperties object itself. + */ + public IdentityProperties withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The list of user identities associated with the resource. The user + * identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user identities associated with the resource. The user + * identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the IdentityProperties object itself. + */ + public IdentityProperties withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentityProperties. + */ + public static IdentityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityProperties deserializedIdentityProperties = new IdentityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedIdentityProperties.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityProperties.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentityProperties.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserIdentityProperties.fromJson(reader1)); + deserializedIdentityProperties.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java new file mode 100644 index 000000000000..f95903ad62e4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ImportImageParameters model. + */ +@Fluent +public final class ImportImageParameters implements JsonSerializable { + /* + * The source of the image. + */ + private ImportSource source; + + /* + * List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is + * also omitted). + */ + private List targetTags; + + /* + * List of strings of repository names to do a manifest only copy. No tag will be created. + */ + private List untaggedTargetRepositories; + + /* + * When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the + * operation before any copying begins. + */ + private ImportMode mode; + + /** + * Creates an instance of ImportImageParameters class. + */ + public ImportImageParameters() { + } + + /** + * Get the source property: The source of the image. + * + * @return the source value. + */ + public ImportSource source() { + return this.source; + } + + /** + * Set the source property: The source of the image. + * + * @param source the source value to set. + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withSource(ImportSource source) { + this.source = source; + return this; + } + + /** + * Get the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used + * (or 'latest' if source tag is also omitted). + * + * @return the targetTags value. + */ + public List targetTags() { + return this.targetTags; + } + + /** + * Set the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used + * (or 'latest' if source tag is also omitted). + * + * @param targetTags the targetTags value to set. + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withTargetTags(List targetTags) { + this.targetTags = targetTags; + return this; + } + + /** + * Get the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No + * tag will be created. + * + * @return the untaggedTargetRepositories value. + */ + public List untaggedTargetRepositories() { + return this.untaggedTargetRepositories; + } + + /** + * Set the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No + * tag will be created. + * + * @param untaggedTargetRepositories the untaggedTargetRepositories value to set. + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withUntaggedTargetRepositories(List untaggedTargetRepositories) { + this.untaggedTargetRepositories = untaggedTargetRepositories; + return this; + } + + /** + * Get the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing + * target tags will fail the operation before any copying begins. + * + * @return the mode value. + */ + public ImportMode mode() { + return this.mode; + } + + /** + * Set the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing + * target tags will fail the operation before any copying begins. + * + * @param mode the mode value to set. + * @return the ImportImageParameters object itself. + */ + public ImportImageParameters withMode(ImportMode mode) { + this.mode = mode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("source", this.source); + jsonWriter.writeArrayField("targetTags", this.targetTags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("untaggedTargetRepositories", this.untaggedTargetRepositories, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportImageParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportImageParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportImageParameters. + */ + public static ImportImageParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportImageParameters deserializedImportImageParameters = new ImportImageParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("source".equals(fieldName)) { + deserializedImportImageParameters.source = ImportSource.fromJson(reader); + } else if ("targetTags".equals(fieldName)) { + List targetTags = reader.readArray(reader1 -> reader1.getString()); + deserializedImportImageParameters.targetTags = targetTags; + } else if ("untaggedTargetRepositories".equals(fieldName)) { + List untaggedTargetRepositories = reader.readArray(reader1 -> reader1.getString()); + deserializedImportImageParameters.untaggedTargetRepositories = untaggedTargetRepositories; + } else if ("mode".equals(fieldName)) { + deserializedImportImageParameters.mode = ImportMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedImportImageParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java new file mode 100644 index 000000000000..771071086253 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the + * operation before any copying begins. + */ +public final class ImportMode extends ExpandableStringEnum { + /** + * Static value NoForce for ImportMode. + */ + public static final ImportMode NO_FORCE = fromString("NoForce"); + + /** + * Static value Force for ImportMode. + */ + public static final ImportMode FORCE = fromString("Force"); + + /** + * Creates a new instance of ImportMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImportMode() { + } + + /** + * Creates or finds a ImportMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImportMode. + */ + public static ImportMode fromString(String name) { + return fromString(name, ImportMode.class); + } + + /** + * Gets known ImportMode values. + * + * @return known ImportMode values. + */ + public static Collection values() { + return values(ImportMode.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java new file mode 100644 index 000000000000..116b46b62d96 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ImportSource model. + */ +@Fluent +public final class ImportSource implements JsonSerializable { + /* + * The resource identifier of the source Azure Container Registry. + */ + private String resourceId; + + /* + * The address of the source registry (e.g. 'mcr.microsoft.com'). + */ + private String registryUri; + + /* + * Credentials used when importing from a registry uri. + */ + private ImportSourceCredentials credentials; + + /* + * Repository name of the source image. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + */ + private String sourceImage; + + /** + * Creates an instance of ImportSource class. + */ + public ImportSource() { + } + + /** + * Get the resourceId property: The resource identifier of the source Azure Container Registry. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource identifier of the source Azure Container Registry. + * + * @param resourceId the resourceId value to set. + * @return the ImportSource object itself. + */ + public ImportSource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com'). + * + * @return the registryUri value. + */ + public String registryUri() { + return this.registryUri; + } + + /** + * Set the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com'). + * + * @param registryUri the registryUri value to set. + * @return the ImportSource object itself. + */ + public ImportSource withRegistryUri(String registryUri) { + this.registryUri = registryUri; + return this; + } + + /** + * Get the credentials property: Credentials used when importing from a registry uri. + * + * @return the credentials value. + */ + public ImportSourceCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Credentials used when importing from a registry uri. + * + * @param credentials the credentials value to set. + * @return the ImportSource object itself. + */ + public ImportSource withCredentials(ImportSourceCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the sourceImage property: Repository name of the source image. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + * + * @return the sourceImage value. + */ + public String sourceImage() { + return this.sourceImage; + } + + /** + * Set the sourceImage property: Repository name of the source image. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + * + * @param sourceImage the sourceImage value to set. + * @return the ImportSource object itself. + */ + public ImportSource withSourceImage(String sourceImage) { + this.sourceImage = sourceImage; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceImage", this.sourceImage); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("registryUri", this.registryUri); + jsonWriter.writeJsonField("credentials", this.credentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportSource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportSource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportSource. + */ + public static ImportSource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportSource deserializedImportSource = new ImportSource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceImage".equals(fieldName)) { + deserializedImportSource.sourceImage = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedImportSource.resourceId = reader.getString(); + } else if ("registryUri".equals(fieldName)) { + deserializedImportSource.registryUri = reader.getString(); + } else if ("credentials".equals(fieldName)) { + deserializedImportSource.credentials = ImportSourceCredentials.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportSource; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java new file mode 100644 index 000000000000..5b2b2ff7a29c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ImportSourceCredentials model. + */ +@Fluent +public final class ImportSourceCredentials implements JsonSerializable { + /* + * The username to authenticate with the source registry. + */ + private String username; + + /* + * The password used to authenticate with the source registry. + */ + private String password; + + /** + * Creates an instance of ImportSourceCredentials class. + */ + public ImportSourceCredentials() { + } + + /** + * Get the username property: The username to authenticate with the source registry. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username to authenticate with the source registry. + * + * @param username the username value to set. + * @return the ImportSourceCredentials object itself. + */ + public ImportSourceCredentials withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password used to authenticate with the source registry. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password used to authenticate with the source registry. + * + * @param password the password value to set. + * @return the ImportSourceCredentials object itself. + */ + public ImportSourceCredentials withPassword(String password) { + this.password = password; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("username", this.username); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportSourceCredentials from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportSourceCredentials if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportSourceCredentials. + */ + public static ImportSourceCredentials fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportSourceCredentials deserializedImportSourceCredentials = new ImportSourceCredentials(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("password".equals(fieldName)) { + deserializedImportSourceCredentials.password = reader.getString(); + } else if ("username".equals(fieldName)) { + deserializedImportSourceCredentials.username = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportSourceCredentials; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java new file mode 100644 index 000000000000..750ad5e997df --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The KeyVaultProperties model. + */ +@Fluent +public final class KeyVaultProperties implements JsonSerializable { + /* + * Key vault uri to access the encryption key. + */ + private String keyIdentifier; + + /* + * The fully qualified key identifier that includes the version of the key that is actually used for encryption. + */ + private String versionedKeyIdentifier; + + /* + * The client id of the identity which will be used to access key vault. + */ + private String identity; + + /* + * Auto key rotation status for a CMK enabled registry. + */ + private Boolean keyRotationEnabled; + + /* + * Timestamp of the last successful key rotation. + */ + private OffsetDateTime lastKeyRotationTimestamp; + + /** + * Creates an instance of KeyVaultProperties class. + */ + public KeyVaultProperties() { + } + + /** + * Get the keyIdentifier property: Key vault uri to access the encryption key. + * + * @return the keyIdentifier value. + */ + public String keyIdentifier() { + return this.keyIdentifier; + } + + /** + * Set the keyIdentifier property: Key vault uri to access the encryption key. + * + * @param keyIdentifier the keyIdentifier value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + return this; + } + + /** + * Get the versionedKeyIdentifier property: The fully qualified key identifier that includes the version of the key + * that is actually used for encryption. + * + * @return the versionedKeyIdentifier value. + */ + public String versionedKeyIdentifier() { + return this.versionedKeyIdentifier; + } + + /** + * Get the identity property: The client id of the identity which will be used to access key vault. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The client id of the identity which will be used to access key vault. + * + * @param identity the identity value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the keyRotationEnabled property: Auto key rotation status for a CMK enabled registry. + * + * @return the keyRotationEnabled value. + */ + public Boolean keyRotationEnabled() { + return this.keyRotationEnabled; + } + + /** + * Get the lastKeyRotationTimestamp property: Timestamp of the last successful key rotation. + * + * @return the lastKeyRotationTimestamp value. + */ + public OffsetDateTime lastKeyRotationTimestamp() { + return this.lastKeyRotationTimestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); + jsonWriter.writeStringField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the KeyVaultProperties. + */ + public static KeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultProperties deserializedKeyVaultProperties = new KeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyIdentifier".equals(fieldName)) { + deserializedKeyVaultProperties.keyIdentifier = reader.getString(); + } else if ("versionedKeyIdentifier".equals(fieldName)) { + deserializedKeyVaultProperties.versionedKeyIdentifier = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedKeyVaultProperties.identity = reader.getString(); + } else if ("keyRotationEnabled".equals(fieldName)) { + deserializedKeyVaultProperties.keyRotationEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("lastKeyRotationTimestamp".equals(fieldName)) { + deserializedKeyVaultProperties.lastKeyRotationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java new file mode 100644 index 000000000000..7706914ffe72 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The verbosity of logs persisted on the connected registry. + */ +public final class LogLevel extends ExpandableStringEnum { + /** + * Static value Debug for LogLevel. + */ + public static final LogLevel DEBUG = fromString("Debug"); + + /** + * Static value Information for LogLevel. + */ + public static final LogLevel INFORMATION = fromString("Information"); + + /** + * Static value Warning for LogLevel. + */ + public static final LogLevel WARNING = fromString("Warning"); + + /** + * Static value Error for LogLevel. + */ + public static final LogLevel ERROR = fromString("Error"); + + /** + * Static value None for LogLevel. + */ + public static final LogLevel NONE = fromString("None"); + + /** + * Creates a new instance of LogLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogLevel() { + } + + /** + * Creates or finds a LogLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogLevel. + */ + public static LogLevel fromString(String name) { + return fromString(name, LogLevel.class); + } + + /** + * Gets known LogLevel values. + * + * @return known LogLevel values. + */ + public static Collection values() { + return values(LogLevel.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java new file mode 100644 index 000000000000..c58292e7032b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The logging properties of the connected registry. + */ +@Fluent +public final class LoggingProperties implements JsonSerializable { + /* + * The verbosity of logs persisted on the connected registry. + */ + private LogLevel logLevel; + + /* + * Indicates whether audit logs are enabled on the connected registry. + */ + private AuditLogStatus auditLogStatus; + + /** + * Creates an instance of LoggingProperties class. + */ + public LoggingProperties() { + } + + /** + * Get the logLevel property: The verbosity of logs persisted on the connected registry. + * + * @return the logLevel value. + */ + public LogLevel logLevel() { + return this.logLevel; + } + + /** + * Set the logLevel property: The verbosity of logs persisted on the connected registry. + * + * @param logLevel the logLevel value to set. + * @return the LoggingProperties object itself. + */ + public LoggingProperties withLogLevel(LogLevel logLevel) { + this.logLevel = logLevel; + return this; + } + + /** + * Get the auditLogStatus property: Indicates whether audit logs are enabled on the connected registry. + * + * @return the auditLogStatus value. + */ + public AuditLogStatus auditLogStatus() { + return this.auditLogStatus; + } + + /** + * Set the auditLogStatus property: Indicates whether audit logs are enabled on the connected registry. + * + * @param auditLogStatus the auditLogStatus value to set. + * @return the LoggingProperties object itself. + */ + public LoggingProperties withAuditLogStatus(AuditLogStatus auditLogStatus) { + this.auditLogStatus = auditLogStatus; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); + jsonWriter.writeStringField("auditLogStatus", + this.auditLogStatus == null ? null : this.auditLogStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoggingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoggingProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LoggingProperties. + */ + public static LoggingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoggingProperties deserializedLoggingProperties = new LoggingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logLevel".equals(fieldName)) { + deserializedLoggingProperties.logLevel = LogLevel.fromString(reader.getString()); + } else if ("auditLogStatus".equals(fieldName)) { + deserializedLoggingProperties.auditLogStatus = AuditLogStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLoggingProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java new file mode 100644 index 000000000000..436d62b93de6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The login server properties of the connected registry. + */ +@Immutable +public final class LoginServerProperties implements JsonSerializable { + /* + * The host of the connected registry. Can be FQDN or IP. + */ + private String host; + + /* + * The TLS properties of the connected registry login server. + */ + private TlsProperties tls; + + /** + * Creates an instance of LoginServerProperties class. + */ + public LoginServerProperties() { + } + + /** + * Get the host property: The host of the connected registry. Can be FQDN or IP. + * + * @return the host value. + */ + public String host() { + return this.host; + } + + /** + * Get the tls property: The TLS properties of the connected registry login server. + * + * @return the tls value. + */ + public TlsProperties tls() { + return this.tls; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoginServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoginServerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LoginServerProperties. + */ + public static LoginServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoginServerProperties deserializedLoginServerProperties = new LoginServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("host".equals(fieldName)) { + deserializedLoginServerProperties.host = reader.getString(); + } else if ("tls".equals(fieldName)) { + deserializedLoginServerProperties.tls = TlsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoginServerProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java new file mode 100644 index 000000000000..b46a59e755c7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether to allow trusted Azure services to access a network restricted registry. + */ +public final class NetworkRuleBypassOptions extends ExpandableStringEnum { + /** + * Static value AzureServices for NetworkRuleBypassOptions. + */ + public static final NetworkRuleBypassOptions AZURE_SERVICES = fromString("AzureServices"); + + /** + * Static value None for NetworkRuleBypassOptions. + */ + public static final NetworkRuleBypassOptions NONE = fromString("None"); + + /** + * Creates a new instance of NetworkRuleBypassOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkRuleBypassOptions() { + } + + /** + * Creates or finds a NetworkRuleBypassOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkRuleBypassOptions. + */ + public static NetworkRuleBypassOptions fromString(String name) { + return fromString(name, NetworkRuleBypassOptions.class); + } + + /** + * Gets known NetworkRuleBypassOptions values. + * + * @return known NetworkRuleBypassOptions values. + */ + public static Collection values() { + return values(NetworkRuleBypassOptions.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java new file mode 100644 index 000000000000..372fda0727e6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The network rule set for a container registry. + */ +@Fluent +public final class NetworkRuleSet implements JsonSerializable { + /* + * The default action of allow or deny when no other rules match. + */ + private DefaultAction defaultAction; + + /* + * The IP ACL rules. + */ + private List ipRules; + + /** + * Creates an instance of NetworkRuleSet class. + */ + public NetworkRuleSet() { + } + + /** + * Get the defaultAction property: The default action of allow or deny when no other rules match. + * + * @return the defaultAction value. + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: The default action of allow or deny when no other rules match. + * + * @param defaultAction the defaultAction value to set. + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the ipRules property: The IP ACL rules. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: The IP ACL rules. + * + * @param ipRules the ipRules value to set. + * @return the NetworkRuleSet object itself. + */ + public NetworkRuleSet withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); + jsonWriter.writeArrayField("ipRules", this.ipRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkRuleSet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkRuleSet if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkRuleSet. + */ + public static NetworkRuleSet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkRuleSet deserializedNetworkRuleSet = new NetworkRuleSet(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultAction".equals(fieldName)) { + deserializedNetworkRuleSet.defaultAction = DefaultAction.fromString(reader.getString()); + } else if ("ipRules".equals(fieldName)) { + List ipRules = reader.readArray(reader1 -> IPRule.fromJson(reader1)); + deserializedNetworkRuleSet.ipRules = ipRules; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkRuleSet; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java new file mode 100644 index 000000000000..32b7129f0719 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; + +/** + * An immutable client-side representation of OperationDefinition. + */ +public interface OperationDefinition { + /** + * Gets the origin property: The origin information of the container registry operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + String name(); + + /** + * Gets the display property: The display information for the container registry operation. + * + * @return the display value. + */ + OperationDisplayDefinition display(); + + /** + * Gets the isDataAction property: This property indicates if the operation is an action or a data action + * ref: + * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the serviceSpecification property: The definition of Azure Monitoring service. + * + * @return the serviceSpecification value. + */ + OperationServiceSpecificationDefinition serviceSpecification(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner + * object. + * + * @return the inner object. + */ + OperationDefinitionInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java new file mode 100644 index 000000000000..556dccf4c295 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The display information for a container registry operation. + */ +@Immutable +public final class OperationDisplayDefinition implements JsonSerializable { + /* + * The resource provider name: Microsoft.ContainerRegistry. + */ + private String provider; + + /* + * The resource on which the operation is performed. + */ + private String resource; + + /* + * The operation that users can perform. + */ + private String operation; + + /* + * The description for the operation. + */ + private String description; + + /** + * Creates an instance of OperationDisplayDefinition class. + */ + private OperationDisplayDefinition() { + } + + /** + * Get the provider property: The resource provider name: Microsoft.ContainerRegistry. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The resource on which the operation is performed. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The operation that users can perform. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The description for the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplayDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplayDefinition if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplayDefinition. + */ + public static OperationDisplayDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplayDefinition deserializedOperationDisplayDefinition = new OperationDisplayDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplayDefinition.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplayDefinition.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplayDefinition.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplayDefinition.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplayDefinition; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java new file mode 100644 index 000000000000..f0b7ae0a0777 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The definition of Azure Monitoring log. + */ +@Immutable +public final class OperationLogSpecificationDefinition + implements JsonSerializable { + /* + * Log name. + */ + private String name; + + /* + * Log display name. + */ + private String displayName; + + /* + * Log blob duration. + */ + private String blobDuration; + + /** + * Creates an instance of OperationLogSpecificationDefinition class. + */ + private OperationLogSpecificationDefinition() { + } + + /** + * Get the name property: Log name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the displayName property: Log display name. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the blobDuration property: Log blob duration. + * + * @return the blobDuration value. + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("blobDuration", this.blobDuration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationLogSpecificationDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationLogSpecificationDefinition if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationLogSpecificationDefinition. + */ + public static OperationLogSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationLogSpecificationDefinition deserializedOperationLogSpecificationDefinition + = new OperationLogSpecificationDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationLogSpecificationDefinition.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedOperationLogSpecificationDefinition.displayName = reader.getString(); + } else if ("blobDuration".equals(fieldName)) { + deserializedOperationLogSpecificationDefinition.blobDuration = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationLogSpecificationDefinition; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java new file mode 100644 index 000000000000..4dc87249a8f3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The definition of Azure Monitoring metric. + */ +@Immutable +public final class OperationMetricSpecificationDefinition + implements JsonSerializable { + /* + * Metric name. + */ + private String name; + + /* + * Metric display name. + */ + private String displayName; + + /* + * Metric description. + */ + private String displayDescription; + + /* + * Metric unit. + */ + private String unit; + + /* + * Metric aggregation type. + */ + private String aggregationType; + + /* + * Internal metric name. + */ + private String internalMetricName; + + /** + * Creates an instance of OperationMetricSpecificationDefinition class. + */ + private OperationMetricSpecificationDefinition() { + } + + /** + * Get the name property: Metric name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the displayName property: Metric display name. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the displayDescription property: Metric description. + * + * @return the displayDescription value. + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Get the unit property: Metric unit. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Get the aggregationType property: Metric aggregation type. + * + * @return the aggregationType value. + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Get the internalMetricName property: Internal metric name. + * + * @return the internalMetricName value. + */ + public String internalMetricName() { + return this.internalMetricName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("displayDescription", this.displayDescription); + jsonWriter.writeStringField("unit", this.unit); + jsonWriter.writeStringField("aggregationType", this.aggregationType); + jsonWriter.writeStringField("internalMetricName", this.internalMetricName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationMetricSpecificationDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationMetricSpecificationDefinition if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationMetricSpecificationDefinition. + */ + public static OperationMetricSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationMetricSpecificationDefinition deserializedOperationMetricSpecificationDefinition + = new OperationMetricSpecificationDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.displayName = reader.getString(); + } else if ("displayDescription".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.displayDescription = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.unit = reader.getString(); + } else if ("aggregationType".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.aggregationType = reader.getString(); + } else if ("internalMetricName".equals(fieldName)) { + deserializedOperationMetricSpecificationDefinition.internalMetricName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationMetricSpecificationDefinition; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java new file mode 100644 index 000000000000..03f696c779b2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The definition of Azure Monitoring list. + */ +@Immutable +public final class OperationServiceSpecificationDefinition + implements JsonSerializable { + /* + * A list of Azure Monitoring metrics definition. + */ + private List metricSpecifications; + + /* + * A list of Azure Monitoring log definitions. + */ + private List logSpecifications; + + /** + * Creates an instance of OperationServiceSpecificationDefinition class. + */ + private OperationServiceSpecificationDefinition() { + } + + /** + * Get the metricSpecifications property: A list of Azure Monitoring metrics definition. + * + * @return the metricSpecifications value. + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Get the logSpecifications property: A list of Azure Monitoring log definitions. + * + * @return the logSpecifications value. + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("metricSpecifications", this.metricSpecifications, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("logSpecifications", this.logSpecifications, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationServiceSpecificationDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationServiceSpecificationDefinition if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationServiceSpecificationDefinition. + */ + public static OperationServiceSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationServiceSpecificationDefinition deserializedOperationServiceSpecificationDefinition + = new OperationServiceSpecificationDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("metricSpecifications".equals(fieldName)) { + List metricSpecifications + = reader.readArray(reader1 -> OperationMetricSpecificationDefinition.fromJson(reader1)); + deserializedOperationServiceSpecificationDefinition.metricSpecifications = metricSpecifications; + } else if ("logSpecifications".equals(fieldName)) { + List logSpecifications + = reader.readArray(reader1 -> OperationLogSpecificationDefinition.fromJson(reader1)); + deserializedOperationServiceSpecificationDefinition.logSpecifications = logSpecifications; + } else { + reader.skipChildren(); + } + } + + return deserializedOperationServiceSpecificationDefinition; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java new file mode 100644 index 000000000000..132fd1396e77 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @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 result of a request to list container registry operations as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java new file mode 100644 index 000000000000..1207b17cf8e0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of the connected registry parent. + */ +@Fluent +public final class ParentProperties implements JsonSerializable { + /* + * The resource ID of the parent to which the connected registry will be associated. + */ + private String id; + + /* + * The sync properties of the connected registry with its parent. + */ + private SyncProperties syncProperties; + + /** + * Creates an instance of ParentProperties class. + */ + public ParentProperties() { + } + + /** + * Get the id property: The resource ID of the parent to which the connected registry will be associated. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource ID of the parent to which the connected registry will be associated. + * + * @param id the id value to set. + * @return the ParentProperties object itself. + */ + public ParentProperties withId(String id) { + this.id = id; + return this; + } + + /** + * Get the syncProperties property: The sync properties of the connected registry with its parent. + * + * @return the syncProperties value. + */ + public SyncProperties syncProperties() { + return this.syncProperties; + } + + /** + * Set the syncProperties property: The sync properties of the connected registry with its parent. + * + * @param syncProperties the syncProperties value to set. + * @return the ParentProperties object itself. + */ + public ParentProperties withSyncProperties(SyncProperties syncProperties) { + this.syncProperties = syncProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("syncProperties", this.syncProperties); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParentProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ParentProperties. + */ + public static ParentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParentProperties deserializedParentProperties = new ParentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("syncProperties".equals(fieldName)) { + deserializedParentProperties.syncProperties = SyncProperties.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedParentProperties.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedParentProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java new file mode 100644 index 000000000000..e2e7a71b068c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +/** + * The password name. + */ +public enum PasswordName { + /** + * Enum value password. + */ + PASSWORD("password"), + + /** + * Enum value password2. + */ + PASSWORD2("password2"); + + /** + * The actual serialized value for a PasswordName instance. + */ + private final String value; + + PasswordName(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PasswordName instance. + * + * @param value the serialized value to parse. + * @return the parsed PasswordName object, or null if unable to parse. + */ + public static PasswordName fromString(String value) { + if (value == null) { + return null; + } + PasswordName[] items = PasswordName.values(); + for (PasswordName item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java new file mode 100644 index 000000000000..09f636a613f2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The policies for a container registry. + */ +@Fluent +public final class Policies implements JsonSerializable { + /* + * The quarantine policy for a container registry. + */ + private QuarantinePolicy quarantinePolicy; + + /* + * The content trust policy for a container registry. + */ + private TrustPolicy trustPolicy; + + /* + * The retention policy for a container registry. + */ + private RetentionPolicy retentionPolicy; + + /* + * The export policy for a container registry. + */ + private ExportPolicy exportPolicy; + + /* + * The policy for using Azure Resource Manager audience token for a container registry. + */ + private AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy; + + /** + * Creates an instance of Policies class. + */ + public Policies() { + } + + /** + * Get the quarantinePolicy property: The quarantine policy for a container registry. + * + * @return the quarantinePolicy value. + */ + public QuarantinePolicy quarantinePolicy() { + return this.quarantinePolicy; + } + + /** + * Set the quarantinePolicy property: The quarantine policy for a container registry. + * + * @param quarantinePolicy the quarantinePolicy value to set. + * @return the Policies object itself. + */ + public Policies withQuarantinePolicy(QuarantinePolicy quarantinePolicy) { + this.quarantinePolicy = quarantinePolicy; + return this; + } + + /** + * Get the trustPolicy property: The content trust policy for a container registry. + * + * @return the trustPolicy value. + */ + public TrustPolicy trustPolicy() { + return this.trustPolicy; + } + + /** + * Set the trustPolicy property: The content trust policy for a container registry. + * + * @param trustPolicy the trustPolicy value to set. + * @return the Policies object itself. + */ + public Policies withTrustPolicy(TrustPolicy trustPolicy) { + this.trustPolicy = trustPolicy; + return this; + } + + /** + * Get the retentionPolicy property: The retention policy for a container registry. + * + * @return the retentionPolicy value. + */ + public RetentionPolicy retentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: The retention policy for a container registry. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the Policies object itself. + */ + public Policies withRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + + /** + * Get the exportPolicy property: The export policy for a container registry. + * + * @return the exportPolicy value. + */ + public ExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: The export policy for a container registry. + * + * @param exportPolicy the exportPolicy value to set. + * @return the Policies object itself. + */ + public Policies withExportPolicy(ExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the azureADAuthenticationAsArmPolicy property: The policy for using Azure Resource Manager audience token for + * a container registry. + * + * @return the azureADAuthenticationAsArmPolicy value. + */ + public AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy() { + return this.azureADAuthenticationAsArmPolicy; + } + + /** + * Set the azureADAuthenticationAsArmPolicy property: The policy for using Azure Resource Manager audience token for + * a container registry. + * + * @param azureADAuthenticationAsArmPolicy the azureADAuthenticationAsArmPolicy value to set. + * @return the Policies object itself. + */ + public Policies + withAzureADAuthenticationAsArmPolicy(AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy) { + this.azureADAuthenticationAsArmPolicy = azureADAuthenticationAsArmPolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("quarantinePolicy", this.quarantinePolicy); + jsonWriter.writeJsonField("trustPolicy", this.trustPolicy); + jsonWriter.writeJsonField("retentionPolicy", this.retentionPolicy); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeJsonField("azureADAuthenticationAsArmPolicy", this.azureADAuthenticationAsArmPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Policies from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Policies if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Policies. + */ + public static Policies fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Policies deserializedPolicies = new Policies(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("quarantinePolicy".equals(fieldName)) { + deserializedPolicies.quarantinePolicy = QuarantinePolicy.fromJson(reader); + } else if ("trustPolicy".equals(fieldName)) { + deserializedPolicies.trustPolicy = TrustPolicy.fromJson(reader); + } else if ("retentionPolicy".equals(fieldName)) { + deserializedPolicies.retentionPolicy = RetentionPolicy.fromJson(reader); + } else if ("exportPolicy".equals(fieldName)) { + deserializedPolicies.exportPolicy = ExportPolicy.fromJson(reader); + } else if ("azureADAuthenticationAsArmPolicy".equals(fieldName)) { + deserializedPolicies.azureADAuthenticationAsArmPolicy + = AzureADAuthenticationAsArmPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicies; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java new file mode 100644 index 000000000000..3002fdef12ea --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The value that indicates whether the policy is enabled or not. + */ +public final class PolicyStatus extends ExpandableStringEnum { + /** + * Static value enabled for PolicyStatus. + */ + public static final PolicyStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for PolicyStatus. + */ + public static final PolicyStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of PolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyStatus() { + } + + /** + * Creates or finds a PolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyStatus. + */ + public static PolicyStatus fromString(String name) { + return fromString(name, PolicyStatus.class); + } + + /** + * Gets known PolicyStatus values. + * + * @return known PolicyStatus values. + */ + public static Collection values() { + return values(PolicyStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java new file mode 100644 index 000000000000..4d3a382144b2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Private Endpoint resource. + */ +@Fluent +public final class PrivateEndpoint implements JsonSerializable { + /* + * This is private endpoint resource created with Microsoft.Network resource provider. + */ + private String id; + + /** + * Creates an instance of PrivateEndpoint class. + */ + public PrivateEndpoint() { + } + + /** + * Get the id property: This is private endpoint resource created with Microsoft.Network resource provider. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: This is private endpoint resource created with Microsoft.Network resource provider. + * + * @param id the id value to set. + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..936e2ac6a1ea --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; + +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of a private endpoint connection. + * + * @return the properties value. + */ + PrivateEndpointConnectionProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PrivateEndpointConnection definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the PrivateEndpointConnection 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateEndpointConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnection create(Context context); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of a private endpoint connection.. + * + * @param properties The properties of a private endpoint connection. + * @return the next definition stage. + */ + WithCreate withProperties(PrivateEndpointConnectionProperties properties); + } + } + + /** + * Begins update for the PrivateEndpointConnection resource. + * + * @return the stage of resource update. + */ + PrivateEndpointConnection.Update update(); + + /** + * The template for PrivateEndpointConnection update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateEndpointConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateEndpointConnection apply(Context context); + } + + /** + * The PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the PrivateEndpointConnection update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of a private endpoint connection.. + * + * @param properties The properties of a private endpoint connection. + * @return the next definition stage. + */ + Update withProperties(PrivateEndpointConnectionProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..d81e706f6f86 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { + /* + * The resource of private endpoint. + */ + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of private endpoint connection resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of private endpoint connection resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionState.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java new file mode 100644 index 000000000000..8267ec5c5024 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections { + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, + String privateEndpointConnectionName, Context context); + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 specified private endpoint connection associated with the container registry. + */ + PrivateEndpointConnection get(String resourceGroupName, String registryName, String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 registryName, String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, Context context); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response}. + */ + PrivateEndpointConnection getById(String id); + + /** + * Get the specified private endpoint connection associated with the container registry. + * + * @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 specified private endpoint connection associated with the container registry along with + * {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @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); + + /** + * Deletes the specified private endpoint connection associated with the container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateEndpointConnection resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java new file mode 100644 index 000000000000..af0b788122cc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; + +/** + * An immutable client-side representation of PrivateLinkResource. + */ +public interface PrivateLinkResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: A resource that supports private link capabilities. + * + * @return the properties value. + */ + PrivateLinkResourceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..cfb9f77a34bd --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of a private link resource. + */ +@Immutable +public final class PrivateLinkResourceProperties implements JsonSerializable { + /* + * The private link resource group id. + */ + private String groupId; + + /* + * The private link resource required member names. + */ + private List requiredMembers; + + /* + * The private link resource private link DNS zone name. + */ + private List requiredZoneNames; + + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ + private PrivateLinkResourceProperties() { + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..a18b2f8bea7d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The state of a private link service connection. + */ +@Fluent +public final class PrivateLinkServiceConnectionState implements JsonSerializable { + /* + * The private link service connection status. + */ + private ConnectionStatus status; + + /* + * The description for connection status. For example if connection is rejected it can indicate reason for + * rejection. + */ + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + private ActionsRequired actionsRequired; + + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: The private link service connection status. + * + * @return the status value. + */ + public ConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: The private link service connection status. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The description for connection status. For example if connection is rejected it can + * indicate reason for rejection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description for connection status. For example if connection is rejected it can + * indicate reason for rejection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public ActionsRequired actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(ActionsRequired actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", + this.actionsRequired == null ? null : this.actionsRequired.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. + */ + public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState + = new PrivateLinkServiceConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = ConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired + = ActionsRequired.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionState; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java new file mode 100644 index 000000000000..1db0e15f8845 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the archive at the time the operation was called. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for ProvisioningState. + */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java new file mode 100644 index 000000000000..6d2303859cfb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether or not public network access is allowed for the container registry. + */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** + * Static value Enabled for PublicNetworkAccess. + */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for PublicNetworkAccess. + */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicNetworkAccess() { + } + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java new file mode 100644 index 000000000000..19f37023f9b3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The quarantine policy for a container registry. + */ +@Fluent +public final class QuarantinePolicy implements JsonSerializable { + /* + * The value that indicates whether the policy is enabled or not. + */ + private PolicyStatus status; + + /** + * Creates an instance of QuarantinePolicy class. + */ + public QuarantinePolicy() { + } + + /** + * Get the status property: The value that indicates whether the policy is enabled or not. + * + * @return the status value. + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The value that indicates whether the policy is enabled or not. + * + * @param status the status value to set. + * @return the QuarantinePolicy object itself. + */ + public QuarantinePolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuarantinePolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuarantinePolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QuarantinePolicy. + */ + public static QuarantinePolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuarantinePolicy deserializedQuarantinePolicy = new QuarantinePolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedQuarantinePolicy.status = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedQuarantinePolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java new file mode 100644 index 000000000000..e734076050fe --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The parameters used to regenerate the login credential. + */ +@Fluent +public final class RegenerateCredentialParameters implements JsonSerializable { + /* + * Specifies name of the password which should be regenerated -- password or password2. + */ + private PasswordName name; + + /** + * Creates an instance of RegenerateCredentialParameters class. + */ + public RegenerateCredentialParameters() { + } + + /** + * Get the name property: Specifies name of the password which should be regenerated -- password or password2. + * + * @return the name value. + */ + public PasswordName name() { + return this.name; + } + + /** + * Set the name property: Specifies name of the password which should be regenerated -- password or password2. + * + * @param name the name value to set. + * @return the RegenerateCredentialParameters object itself. + */ + public RegenerateCredentialParameters withName(PasswordName name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegenerateCredentialParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegenerateCredentialParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RegenerateCredentialParameters. + */ + public static RegenerateCredentialParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegenerateCredentialParameters deserializedRegenerateCredentialParameters + = new RegenerateCredentialParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRegenerateCredentialParameters.name = PasswordName.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegenerateCredentialParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java new file mode 100644 index 000000000000..a469b9b73938 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 Registries. + */ +public interface Registries { + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 properties of the specified container registry. + */ + Registry getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 deleteByResourceGroup(String resourceGroupName, String registryName); + + /** + * Deletes a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 delete(String resourceGroupName, String registryName, Context context); + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the container registries under the specified resource group. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all the container registries under the specified subscription. + * + * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, Context context); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response}. + */ + Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry. + */ + RegistryUsageListResult listUsages(String resourceGroupName, String registryName); + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 response from the ListCredentials operation along with {@link Response}. + */ + Response listCredentialsWithResponse(String resourceGroupName, String registryName, + Context context); + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 response from the ListCredentials operation. + */ + RegistryListCredentialsResult listCredentials(String resourceGroupName, String registryName); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation along with {@link Response}. + */ + Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation. + */ + RegistryListCredentialsResult regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response}. + */ + Response checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, + Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name. + */ + RegistryNameStatus checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. + */ + Response getPrivateLinkResourceWithResponse(String resourceGroupName, String registryName, + String groupName, Context context); + + /** + * Gets a private link resource by a specified group name for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. + */ + PrivateLinkResource getPrivateLinkResource(String resourceGroupName, String registryName, String groupName); + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, + Context context); + + /** + * Gets the properties of the specified container registry. + * + * @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 properties of the specified container registry along with {@link Response}. + */ + Registry getById(String id); + + /** + * Gets the properties of the specified container registry. + * + * @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 properties of the specified container registry along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a container registry. + * + * @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); + + /** + * Deletes a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Registry resource. + * + * @param name resource name. + * @return the first stage of the new Registry definition. + */ + Registry.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java new file mode 100644 index 000000000000..d05aef22474c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; +import java.util.Map; + +/** + * An immutable client-side representation of Registry. + */ +public interface Registry { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The properties of the container registry. + * + * @return the properties value. + */ + RegistryProperties properties(); + + /** + * Gets the sku property: The SKU of the container registry. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the identity property: The identity of the container registry. + * + * @return the identity value. + */ + IdentityProperties identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.containerregistry.generated.fluent.models.RegistryInner object. + * + * @return the inner object. + */ + RegistryInner innerModel(); + + /** + * The entirety of the Registry definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { + } + + /** + * The Registry definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Registry definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Registry 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the Registry definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithSku withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Registry definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU of the container registry.. + * + * @param sku The SKU of the container registry. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + + /** + * The stage of the Registry 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.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + Registry create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Registry create(Context context); + } + + /** + * The stage of the Registry 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 Registry definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the container registry.. + * + * @param properties The properties of the container registry. + * @return the next definition stage. + */ + WithCreate withProperties(RegistryProperties properties); + } + + /** + * The stage of the Registry definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the container registry.. + * + * @param identity The identity of the container registry. + * @return the next definition stage. + */ + WithCreate withIdentity(IdentityProperties identity); + } + } + + /** + * Begins update for the Registry resource. + * + * @return the stage of resource update. + */ + Registry.Update update(); + + /** + * The template for Registry update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, + UpdateStages.WithAdminUserEnabled, UpdateStages.WithNetworkRuleSet, UpdateStages.WithPolicies, + UpdateStages.WithEncryption, UpdateStages.WithDataEndpointEnabled, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithNetworkRuleBypassOptions, UpdateStages.WithNetworkRuleBypassAllowedForTasks, + UpdateStages.WithAnonymousPullEnabled, UpdateStages.WithRoleAssignmentMode { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Registry apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Registry apply(Context context); + } + + /** + * The Registry update stages. + */ + interface UpdateStages { + /** + * The stage of the Registry update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags for the container registry.. + * + * @param tags The tags for the container registry. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the Registry update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the container registry.. + * + * @param identity The identity of the container registry. + * @return the next definition stage. + */ + Update withIdentity(IdentityProperties identity); + } + + /** + * The stage of the Registry update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU of the container registry.. + * + * @param sku The SKU of the container registry. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + + /** + * The stage of the Registry update allowing to specify adminUserEnabled. + */ + interface WithAdminUserEnabled { + /** + * Specifies the adminUserEnabled property: The value that indicates whether the admin user is enabled.. + * + * @param adminUserEnabled The value that indicates whether the admin user is enabled. + * @return the next definition stage. + */ + Update withAdminUserEnabled(Boolean adminUserEnabled); + } + + /** + * The stage of the Registry update allowing to specify networkRuleSet. + */ + interface WithNetworkRuleSet { + /** + * Specifies the networkRuleSet property: The network rule set for a container registry.. + * + * @param networkRuleSet The network rule set for a container registry. + * @return the next definition stage. + */ + Update withNetworkRuleSet(NetworkRuleSet networkRuleSet); + } + + /** + * The stage of the Registry update allowing to specify policies. + */ + interface WithPolicies { + /** + * Specifies the policies property: The policies for a container registry.. + * + * @param policies The policies for a container registry. + * @return the next definition stage. + */ + Update withPolicies(Policies policies); + } + + /** + * The stage of the Registry update allowing to specify encryption. + */ + interface WithEncryption { + /** + * Specifies the encryption property: The encryption settings of container registry.. + * + * @param encryption The encryption settings of container registry. + * @return the next definition stage. + */ + Update withEncryption(EncryptionProperty encryption); + } + + /** + * The stage of the Registry update allowing to specify dataEndpointEnabled. + */ + interface WithDataEndpointEnabled { + /** + * Specifies the dataEndpointEnabled property: Enable a single data endpoint per region for serving data.. + * + * @param dataEndpointEnabled Enable a single data endpoint per region for serving data. + * @return the next definition stage. + */ + Update withDataEndpointEnabled(Boolean dataEndpointEnabled); + } + + /** + * The stage of the Registry update allowing to specify publicNetworkAccess. + */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for the + * container registry.. + * + * @param publicNetworkAccess Whether or not public network access is allowed for the container registry. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + + /** + * The stage of the Registry update allowing to specify networkRuleBypassOptions. + */ + interface WithNetworkRuleBypassOptions { + /** + * Specifies the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a + * network restricted registry.. + * + * @param networkRuleBypassOptions Whether to allow trusted Azure services to access a network restricted + * registry. + * @return the next definition stage. + */ + Update withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions); + } + + /** + * The stage of the Registry update allowing to specify networkRuleBypassAllowedForTasks. + */ + interface WithNetworkRuleBypassAllowedForTasks { + /** + * Specifies the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a + * network restricted registry.. + * + * @param networkRuleBypassAllowedForTasks Whether to allow ACR Tasks service to access a network restricted + * registry. + * @return the next definition stage. + */ + Update withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks); + } + + /** + * The stage of the Registry update allowing to specify anonymousPullEnabled. + */ + interface WithAnonymousPullEnabled { + /** + * Specifies the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients.. + * + * @param anonymousPullEnabled Enables registry-wide pull from unauthenticated clients. + * @return the next definition stage. + */ + Update withAnonymousPullEnabled(Boolean anonymousPullEnabled); + } + + /** + * The stage of the Registry update allowing to specify roleAssignmentMode. + */ + interface WithRoleAssignmentMode { + /** + * Specifies the roleAssignmentMode property: Determines registry role assignment mode.. + * + * @param roleAssignmentMode Determines registry role assignment mode. + * @return the next definition stage. + */ + Update withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Registry refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Registry refresh(Context context); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(ImportImageParameters parameters); + + /** + * Copies an image to this container registry from the specified container registry. + * + * @param parameters The parameters specifying the image to copy and the source container registry. + * @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 importImage(ImportImageParameters parameters, Context context); + + /** + * Lists the login credentials for the specified container registry. + * + * @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 response from the ListCredentials operation along with {@link Response}. + */ + Response listCredentialsWithResponse(Context context); + + /** + * Lists the login credentials for the specified container registry. + * + * @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 response from the ListCredentials operation. + */ + RegistryListCredentialsResult listCredentials(); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation along with {@link Response}. + */ + Response regenerateCredentialWithResponse( + RegenerateCredentialParameters regenerateCredentialParameters, Context context); + + /** + * Regenerates one of the login credentials for the specified container registry. + * + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. + * @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 response from the ListCredentials operation. + */ + RegistryListCredentialsResult regenerateCredential(RegenerateCredentialParameters regenerateCredentialParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters, + Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java new file mode 100644 index 000000000000..e8eb5bbf747c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; +import java.util.List; + +/** + * An immutable client-side representation of RegistryListCredentialsResult. + */ +public interface RegistryListCredentialsResult { + /** + * Gets the username property: The username for a container registry. + * + * @return the username value. + */ + String username(); + + /** + * Gets the passwords property: The list of passwords for a container registry. + * + * @return the passwords value. + */ + List passwords(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner object. + * + * @return the inner object. + */ + RegistryListCredentialsResultInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java new file mode 100644 index 000000000000..0d5f14131b5b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A request to check whether a container registry name is available. + */ +@Fluent +public final class RegistryNameCheckRequest implements JsonSerializable { + /* + * The name of the container registry. + */ + private String name; + + /* + * The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + */ + private ContainerRegistryResourceType type; + + /** + * Creates an instance of RegistryNameCheckRequest class. + */ + public RegistryNameCheckRequest() { + } + + /** + * Get the name property: The name of the container registry. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the container registry. + * + * @param name the name value to set. + * @return the RegistryNameCheckRequest object itself. + */ + public RegistryNameCheckRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The resource type of the container registry. This field must be set to + * 'Microsoft.ContainerRegistry/registries'. + * + * @return the type value. + */ + public ContainerRegistryResourceType type() { + return this.type; + } + + /** + * Set the type property: The resource type of the container registry. This field must be set to + * 'Microsoft.ContainerRegistry/registries'. + * + * @param type the type value to set. + * @return the RegistryNameCheckRequest object itself. + */ + public RegistryNameCheckRequest withType(ContainerRegistryResourceType type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryNameCheckRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryNameCheckRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RegistryNameCheckRequest. + */ + public static RegistryNameCheckRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryNameCheckRequest deserializedRegistryNameCheckRequest = new RegistryNameCheckRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRegistryNameCheckRequest.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRegistryNameCheckRequest.type + = ContainerRegistryResourceType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryNameCheckRequest; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java new file mode 100644 index 000000000000..8cae32dda859 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; + +/** + * An immutable client-side representation of RegistryNameStatus. + */ +public interface RegistryNameStatus { + /** + * Gets the nameAvailable property: The value that indicates whether the name is available. + * + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * Gets the reason property: If any, the reason that the name is not available. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the message property: If any, the error message that provides more detail for the reason that the name is + * not available. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner + * object. + * + * @return the inner object. + */ + RegistryNameStatusInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java new file mode 100644 index 000000000000..59f9f54fb110 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The login password for the container registry. + */ +@Immutable +public final class RegistryPassword implements JsonSerializable { + /* + * The password name. + */ + private PasswordName name; + + /* + * The password value. + */ + private String value; + + /** + * Creates an instance of RegistryPassword class. + */ + private RegistryPassword() { + } + + /** + * Get the name property: The password name. + * + * @return the name value. + */ + public PasswordName name() { + return this.name; + } + + /** + * Get the value property: The password value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryPassword from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryPassword if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryPassword. + */ + public static RegistryPassword fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryPassword deserializedRegistryPassword = new RegistryPassword(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRegistryPassword.name = PasswordName.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedRegistryPassword.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryPassword; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java new file mode 100644 index 000000000000..c30b8dad158d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java @@ -0,0 +1,482 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The properties of a container registry. + */ +@Fluent +public final class RegistryProperties implements JsonSerializable { + /* + * The URL that can be used to log into the container registry. + */ + private String loginServer; + + /* + * The creation date of the container registry in ISO8601 format. + */ + private OffsetDateTime creationDate; + + /* + * The provisioning state of the container registry at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /* + * The status of the container registry at the time the operation was called. + */ + private Status status; + + /* + * The value that indicates whether the admin user is enabled. + */ + private Boolean adminUserEnabled; + + /* + * The network rule set for a container registry. + */ + private NetworkRuleSet networkRuleSet; + + /* + * The policies for a container registry. + */ + private Policies policies; + + /* + * The encryption settings of container registry. + */ + private EncryptionProperty encryption; + + /* + * Enable a single data endpoint per region for serving data. + */ + private Boolean dataEndpointEnabled; + + /* + * List of host names that will serve data when dataEndpointEnabled is true. + */ + private List dataEndpointHostNames; + + /* + * List of private endpoint connections for a container registry. + */ + private List privateEndpointConnections; + + /* + * Whether or not public network access is allowed for the container registry. + */ + private PublicNetworkAccess publicNetworkAccess; + + /* + * Whether to allow trusted Azure services to access a network restricted registry. + */ + private NetworkRuleBypassOptions networkRuleBypassOptions; + + /* + * Whether or not Tasks allowed to bypass the network rules for this container registry. + */ + private Boolean networkRuleBypassAllowedForTasks; + + /* + * Whether or not zone redundancy is enabled for this container registry + */ + private ZoneRedundancy zoneRedundancy; + + /* + * Enables registry-wide pull from unauthenticated clients. + */ + private Boolean anonymousPullEnabled; + + /* + * Determines registry role assignment mode. + */ + private RoleAssignmentMode roleAssignmentMode; + + /** + * Creates an instance of RegistryProperties class. + */ + public RegistryProperties() { + } + + /** + * Get the loginServer property: The URL that can be used to log into the container registry. + * + * @return the loginServer value. + */ + public String loginServer() { + return this.loginServer; + } + + /** + * Get the creationDate property: The creation date of the container registry in ISO8601 format. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: The provisioning state of the container registry at the time the operation + * was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the container registry at the time the operation was called. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @return the adminUserEnabled value. + */ + public Boolean adminUserEnabled() { + return this.adminUserEnabled; + } + + /** + * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @param adminUserEnabled the adminUserEnabled value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withAdminUserEnabled(Boolean adminUserEnabled) { + this.adminUserEnabled = adminUserEnabled; + return this; + } + + /** + * Get the networkRuleSet property: The network rule set for a container registry. + * + * @return the networkRuleSet value. + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set the networkRuleSet property: The network rule set for a container registry. + * + * @param networkRuleSet the networkRuleSet value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get the policies property: The policies for a container registry. + * + * @return the policies value. + */ + public Policies policies() { + return this.policies; + } + + /** + * Set the policies property: The policies for a container registry. + * + * @param policies the policies value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withPolicies(Policies policies) { + this.policies = policies; + return this; + } + + /** + * Get the encryption property: The encryption settings of container registry. + * + * @return the encryption value. + */ + public EncryptionProperty encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption settings of container registry. + * + * @param encryption the encryption value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withEncryption(EncryptionProperty encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @return the dataEndpointEnabled value. + */ + public Boolean dataEndpointEnabled() { + return this.dataEndpointEnabled; + } + + /** + * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @param dataEndpointEnabled the dataEndpointEnabled value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withDataEndpointEnabled(Boolean dataEndpointEnabled) { + this.dataEndpointEnabled = dataEndpointEnabled; + return this; + } + + /** + * Get the dataEndpointHostNames property: List of host names that will serve data when dataEndpointEnabled is true. + * + * @return the dataEndpointHostNames value. + */ + public List dataEndpointHostNames() { + return this.dataEndpointHostNames; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connections for a container registry. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @return the networkRuleBypassOptions value. + */ + public NetworkRuleBypassOptions networkRuleBypassOptions() { + return this.networkRuleBypassOptions; + } + + /** + * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { + this.networkRuleBypassOptions = networkRuleBypassOptions; + return this; + } + + /** + * Get the networkRuleBypassAllowedForTasks property: Whether or not Tasks allowed to bypass the network rules for + * this container registry. + * + * @return the networkRuleBypassAllowedForTasks value. + */ + public Boolean networkRuleBypassAllowedForTasks() { + return this.networkRuleBypassAllowedForTasks; + } + + /** + * Set the networkRuleBypassAllowedForTasks property: Whether or not Tasks allowed to bypass the network rules for + * this container registry. + * + * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { + this.networkRuleBypassAllowedForTasks = networkRuleBypassAllowedForTasks; + return this; + } + + /** + * Get the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry. + * + * @return the zoneRedundancy value. + */ + public ZoneRedundancy zoneRedundancy() { + return this.zoneRedundancy; + } + + /** + * Set the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry. + * + * @param zoneRedundancy the zoneRedundancy value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withZoneRedundancy(ZoneRedundancy zoneRedundancy) { + this.zoneRedundancy = zoneRedundancy; + return this; + } + + /** + * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @return the anonymousPullEnabled value. + */ + public Boolean anonymousPullEnabled() { + return this.anonymousPullEnabled; + } + + /** + * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @param anonymousPullEnabled the anonymousPullEnabled value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withAnonymousPullEnabled(Boolean anonymousPullEnabled) { + this.anonymousPullEnabled = anonymousPullEnabled; + return this; + } + + /** + * Get the roleAssignmentMode property: Determines registry role assignment mode. + * + * @return the roleAssignmentMode value. + */ + public RoleAssignmentMode roleAssignmentMode() { + return this.roleAssignmentMode; + } + + /** + * Set the roleAssignmentMode property: Determines registry role assignment mode. + * + * @param roleAssignmentMode the roleAssignmentMode value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { + this.roleAssignmentMode = roleAssignmentMode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("adminUserEnabled", this.adminUserEnabled); + jsonWriter.writeJsonField("networkRuleSet", this.networkRuleSet); + jsonWriter.writeJsonField("policies", this.policies); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeStringField("networkRuleBypassOptions", + this.networkRuleBypassOptions == null ? null : this.networkRuleBypassOptions.toString()); + jsonWriter.writeBooleanField("networkRuleBypassAllowedForTasks", this.networkRuleBypassAllowedForTasks); + jsonWriter.writeStringField("zoneRedundancy", + this.zoneRedundancy == null ? null : this.zoneRedundancy.toString()); + jsonWriter.writeBooleanField("anonymousPullEnabled", this.anonymousPullEnabled); + jsonWriter.writeStringField("roleAssignmentMode", + this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryProperties. + */ + public static RegistryProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryProperties deserializedRegistryProperties = new RegistryProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loginServer".equals(fieldName)) { + deserializedRegistryProperties.loginServer = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedRegistryProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedRegistryProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedRegistryProperties.status = Status.fromJson(reader); + } else if ("adminUserEnabled".equals(fieldName)) { + deserializedRegistryProperties.adminUserEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("networkRuleSet".equals(fieldName)) { + deserializedRegistryProperties.networkRuleSet = NetworkRuleSet.fromJson(reader); + } else if ("policies".equals(fieldName)) { + deserializedRegistryProperties.policies = Policies.fromJson(reader); + } else if ("encryption".equals(fieldName)) { + deserializedRegistryProperties.encryption = EncryptionProperty.fromJson(reader); + } else if ("dataEndpointEnabled".equals(fieldName)) { + deserializedRegistryProperties.dataEndpointEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("dataEndpointHostNames".equals(fieldName)) { + List dataEndpointHostNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRegistryProperties.dataEndpointHostNames = dataEndpointHostNames; + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedRegistryProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedRegistryProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("networkRuleBypassOptions".equals(fieldName)) { + deserializedRegistryProperties.networkRuleBypassOptions + = NetworkRuleBypassOptions.fromString(reader.getString()); + } else if ("networkRuleBypassAllowedForTasks".equals(fieldName)) { + deserializedRegistryProperties.networkRuleBypassAllowedForTasks + = reader.getNullable(JsonReader::getBoolean); + } else if ("zoneRedundancy".equals(fieldName)) { + deserializedRegistryProperties.zoneRedundancy = ZoneRedundancy.fromString(reader.getString()); + } else if ("anonymousPullEnabled".equals(fieldName)) { + deserializedRegistryProperties.anonymousPullEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("roleAssignmentMode".equals(fieldName)) { + deserializedRegistryProperties.roleAssignmentMode + = RoleAssignmentMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java new file mode 100644 index 000000000000..ea482c38ed85 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java @@ -0,0 +1,396 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters; +import java.io.IOException; +import java.util.Map; + +/** + * The parameters for updating a container registry. + */ +@Fluent +public final class RegistryUpdateParameters implements JsonSerializable { + /* + * The identity of the container registry. + */ + private IdentityProperties identity; + + /* + * The tags for the container registry. + */ + private Map tags; + + /* + * The SKU of the container registry. + */ + private Sku sku; + + /* + * The properties that the container registry will be updated with. + */ + private RegistryPropertiesUpdateParameters innerProperties; + + /** + * Creates an instance of RegistryUpdateParameters class. + */ + public RegistryUpdateParameters() { + } + + /** + * Get the identity property: The identity of the container registry. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the container registry. + * + * @param identity the identity value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: The tags for the container registry. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags for the container registry. + * + * @param tags the tags value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku property: The SKU of the container registry. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the container registry. + * + * @param sku the sku value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the innerProperties property: The properties that the container registry will be updated with. + * + * @return the innerProperties value. + */ + private RegistryPropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @return the adminUserEnabled value. + */ + public Boolean adminUserEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().adminUserEnabled(); + } + + /** + * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. + * + * @param adminUserEnabled the adminUserEnabled value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withAdminUserEnabled(adminUserEnabled); + return this; + } + + /** + * Get the networkRuleSet property: The network rule set for a container registry. + * + * @return the networkRuleSet value. + */ + public NetworkRuleSet networkRuleSet() { + return this.innerProperties() == null ? null : this.innerProperties().networkRuleSet(); + } + + /** + * Set the networkRuleSet property: The network rule set for a container registry. + * + * @param networkRuleSet the networkRuleSet value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withNetworkRuleSet(networkRuleSet); + return this; + } + + /** + * Get the policies property: The policies for a container registry. + * + * @return the policies value. + */ + public Policies policies() { + return this.innerProperties() == null ? null : this.innerProperties().policies(); + } + + /** + * Set the policies property: The policies for a container registry. + * + * @param policies the policies value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withPolicies(Policies policies) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withPolicies(policies); + return this; + } + + /** + * Get the encryption property: The encryption settings of container registry. + * + * @return the encryption value. + */ + public EncryptionProperty encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: The encryption settings of container registry. + * + * @param encryption the encryption value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withEncryption(EncryptionProperty encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @return the dataEndpointEnabled value. + */ + public Boolean dataEndpointEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().dataEndpointEnabled(); + } + + /** + * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. + * + * @param dataEndpointEnabled the dataEndpointEnabled value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withDataEndpointEnabled(Boolean dataEndpointEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withDataEndpointEnabled(dataEndpointEnabled); + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @return the networkRuleBypassOptions value. + */ + public NetworkRuleBypassOptions networkRuleBypassOptions() { + return this.innerProperties() == null ? null : this.innerProperties().networkRuleBypassOptions(); + } + + /** + * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted + * registry. + * + * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withNetworkRuleBypassOptions(networkRuleBypassOptions); + return this; + } + + /** + * Get the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network + * restricted registry. + * + * @return the networkRuleBypassAllowedForTasks value. + */ + public Boolean networkRuleBypassAllowedForTasks() { + return this.innerProperties() == null ? null : this.innerProperties().networkRuleBypassAllowedForTasks(); + } + + /** + * Set the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network + * restricted registry. + * + * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withNetworkRuleBypassAllowedForTasks(networkRuleBypassAllowedForTasks); + return this; + } + + /** + * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @return the anonymousPullEnabled value. + */ + public Boolean anonymousPullEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().anonymousPullEnabled(); + } + + /** + * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. + * + * @param anonymousPullEnabled the anonymousPullEnabled value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withAnonymousPullEnabled(Boolean anonymousPullEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withAnonymousPullEnabled(anonymousPullEnabled); + return this; + } + + /** + * Get the roleAssignmentMode property: Determines registry role assignment mode. + * + * @return the roleAssignmentMode value. + */ + public RoleAssignmentMode roleAssignmentMode() { + return this.innerProperties() == null ? null : this.innerProperties().roleAssignmentMode(); + } + + /** + * Set the roleAssignmentMode property: Determines registry role assignment mode. + * + * @param roleAssignmentMode the roleAssignmentMode value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withRoleAssignmentMode(roleAssignmentMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryUpdateParameters if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryUpdateParameters. + */ + public static RegistryUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryUpdateParameters deserializedRegistryUpdateParameters = new RegistryUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedRegistryUpdateParameters.identity = IdentityProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedRegistryUpdateParameters.tags = tags; + } else if ("sku".equals(fieldName)) { + deserializedRegistryUpdateParameters.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedRegistryUpdateParameters.innerProperties + = RegistryPropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java new file mode 100644 index 000000000000..651bcf390450 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The quota usage for a container registry. + */ +@Immutable +public final class RegistryUsage implements JsonSerializable { + /* + * The name of the usage. + */ + private String name; + + /* + * The limit of the usage. + */ + private Long limit; + + /* + * The current value of the usage. + */ + private Long currentValue; + + /* + * The unit of measurement. + */ + private RegistryUsageUnit unit; + + /** + * Creates an instance of RegistryUsage class. + */ + private RegistryUsage() { + } + + /** + * Get the name property: The name of the usage. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the limit property: The limit of the usage. + * + * @return the limit value. + */ + public Long limit() { + return this.limit; + } + + /** + * Get the currentValue property: The current value of the usage. + * + * @return the currentValue value. + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Get the unit property: The unit of measurement. + * + * @return the unit value. + */ + public RegistryUsageUnit unit() { + return this.unit; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("limit", this.limit); + jsonWriter.writeNumberField("currentValue", this.currentValue); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistryUsage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistryUsage if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegistryUsage. + */ + public static RegistryUsage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistryUsage deserializedRegistryUsage = new RegistryUsage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRegistryUsage.name = reader.getString(); + } else if ("limit".equals(fieldName)) { + deserializedRegistryUsage.limit = reader.getNullable(JsonReader::getLong); + } else if ("currentValue".equals(fieldName)) { + deserializedRegistryUsage.currentValue = reader.getNullable(JsonReader::getLong); + } else if ("unit".equals(fieldName)) { + deserializedRegistryUsage.unit = RegistryUsageUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistryUsage; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java new file mode 100644 index 000000000000..5b825ce91eb5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of RegistryUsageListResult. + */ +public interface RegistryUsageListResult { + /** + * Gets the value property: The list of container registry quota usages. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner + * object. + * + * @return the inner object. + */ + RegistryUsageListResultInner innerModel(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java new file mode 100644 index 000000000000..29ce8ba3a4bf --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The unit of measurement. + */ +public final class RegistryUsageUnit extends ExpandableStringEnum { + /** + * Static value Count for RegistryUsageUnit. + */ + public static final RegistryUsageUnit COUNT = fromString("Count"); + + /** + * Static value Bytes for RegistryUsageUnit. + */ + public static final RegistryUsageUnit BYTES = fromString("Bytes"); + + /** + * Creates a new instance of RegistryUsageUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegistryUsageUnit() { + } + + /** + * Creates or finds a RegistryUsageUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding RegistryUsageUnit. + */ + public static RegistryUsageUnit fromString(String name) { + return fromString(name, RegistryUsageUnit.class); + } + + /** + * Gets known RegistryUsageUnit values. + * + * @return known RegistryUsageUnit values. + */ + public static Collection values() { + return values(RegistryUsageUnit.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java new file mode 100644 index 000000000000..931c134dd55f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import java.util.Map; + +/** + * An immutable client-side representation of Replication. + */ +public interface Replication { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The properties of the replication. + * + * @return the properties value. + */ + ReplicationProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.containerregistry.generated.fluent.models.ReplicationInner object. + * + * @return the inner object. + */ + ReplicationInner innerModel(); + + /** + * The entirety of the Replication definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Replication definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Replication definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Replication 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 Replication definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the Replication 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Replication create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Replication create(Context context); + } + + /** + * The stage of the Replication 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 Replication definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the replication.. + * + * @param properties The properties of the replication. + * @return the next definition stage. + */ + WithCreate withProperties(ReplicationProperties properties); + } + } + + /** + * Begins update for the Replication resource. + * + * @return the stage of resource update. + */ + Replication.Update update(); + + /** + * The template for Replication update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithRegionEndpointEnabled { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Replication apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Replication apply(Context context); + } + + /** + * The Replication update stages. + */ + interface UpdateStages { + /** + * The stage of the Replication update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags for the replication.. + * + * @param tags The tags for the replication. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the Replication update allowing to specify regionEndpointEnabled. + */ + interface WithRegionEndpointEnabled { + /** + * Specifies the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is + * enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its + * data will continue to be synced with other replications.. + * + * @param regionEndpointEnabled Specifies whether the replication's regional endpoint is enabled. Requests + * will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * @return the next definition stage. + */ + Update withRegionEndpointEnabled(Boolean regionEndpointEnabled); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Replication refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Replication refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java new file mode 100644 index 000000000000..7827aba8a6da --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a replication. + */ +@Fluent +public final class ReplicationProperties implements JsonSerializable { + /* + * The provisioning state of the replication at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /* + * The status of the replication at the time the operation was called. + */ + private Status status; + + /* + * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication + * whose regional endpoint is disabled, however its data will continue to be synced with other replications. + */ + private Boolean regionEndpointEnabled; + + /* + * Whether or not zone redundancy is enabled for this container registry replication + */ + private ZoneRedundancy zoneRedundancy; + + /** + * Creates an instance of ReplicationProperties class. + */ + public ReplicationProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the replication at the time the operation was + * called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the replication at the time the operation was called. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @return the regionEndpointEnabled value. + */ + public Boolean regionEndpointEnabled() { + return this.regionEndpointEnabled; + } + + /** + * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @param regionEndpointEnabled the regionEndpointEnabled value to set. + * @return the ReplicationProperties object itself. + */ + public ReplicationProperties withRegionEndpointEnabled(Boolean regionEndpointEnabled) { + this.regionEndpointEnabled = regionEndpointEnabled; + return this; + } + + /** + * Get the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry + * replication. + * + * @return the zoneRedundancy value. + */ + public ZoneRedundancy zoneRedundancy() { + return this.zoneRedundancy; + } + + /** + * Set the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry + * replication. + * + * @param zoneRedundancy the zoneRedundancy value to set. + * @return the ReplicationProperties object itself. + */ + public ReplicationProperties withZoneRedundancy(ZoneRedundancy zoneRedundancy) { + this.zoneRedundancy = zoneRedundancy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("regionEndpointEnabled", this.regionEndpointEnabled); + jsonWriter.writeStringField("zoneRedundancy", + this.zoneRedundancy == null ? null : this.zoneRedundancy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationProperties. + */ + public static ReplicationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationProperties deserializedReplicationProperties = new ReplicationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedReplicationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedReplicationProperties.status = Status.fromJson(reader); + } else if ("regionEndpointEnabled".equals(fieldName)) { + deserializedReplicationProperties.regionEndpointEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("zoneRedundancy".equals(fieldName)) { + deserializedReplicationProperties.zoneRedundancy = ZoneRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java new file mode 100644 index 000000000000..8610396ca592 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The parameters for updating a replication. + */ +@Fluent +public final class ReplicationUpdateParameters implements JsonSerializable { + /* + * The tags for the replication. + */ + private Map tags; + + /* + * The parameters for updating a replication's properties + */ + private ReplicationUpdateParametersProperties innerProperties; + + /** + * Creates an instance of ReplicationUpdateParameters class. + */ + public ReplicationUpdateParameters() { + } + + /** + * Get the tags property: The tags for the replication. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags for the replication. + * + * @param tags the tags value to set. + * @return the ReplicationUpdateParameters object itself. + */ + public ReplicationUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The parameters for updating a replication's properties. + * + * @return the innerProperties value. + */ + private ReplicationUpdateParametersProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @return the regionEndpointEnabled value. + */ + public Boolean regionEndpointEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().regionEndpointEnabled(); + } + + /** + * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. + * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue + * to be synced with other replications. + * + * @param regionEndpointEnabled the regionEndpointEnabled value to set. + * @return the ReplicationUpdateParameters object itself. + */ + public ReplicationUpdateParameters withRegionEndpointEnabled(Boolean regionEndpointEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new ReplicationUpdateParametersProperties(); + } + this.innerProperties().withRegionEndpointEnabled(regionEndpointEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationUpdateParameters if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationUpdateParameters. + */ + public static ReplicationUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationUpdateParameters deserializedReplicationUpdateParameters = new ReplicationUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedReplicationUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedReplicationUpdateParameters.innerProperties + = ReplicationUpdateParametersProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java new file mode 100644 index 000000000000..504eb358f426 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 Replications. + */ +public interface Replications { + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String replicationName, + Context context); + + /** + * Gets the properties of the specified replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 properties of the specified replication. + */ + Replication get(String resourceGroupName, String registryName, String replicationName); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 registryName, String replicationName); + + /** + * Deletes a replication from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param replicationName The name of the replication. + * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified replication. + * + * @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 properties of the specified replication along with {@link Response}. + */ + Replication getById(String id); + + /** + * Gets the properties of the specified replication. + * + * @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 properties of the specified replication along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a replication from a container registry. + * + * @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); + + /** + * Deletes a replication from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Replication resource. + * + * @param name resource name. + * @return the first stage of the new Replication definition. + */ + Replication.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java new file mode 100644 index 000000000000..47f8b108c3aa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The request that generated the event. + */ +@Immutable +public final class Request implements JsonSerializable { + /* + * The ID of the request that initiated the event. + */ + private String id; + + /* + * The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr + * from the standard http request. + */ + private String addr; + + /* + * The externally accessible hostname of the registry instance, as specified by the http host header on incoming + * requests. + */ + private String host; + + /* + * The request method that generated the event. + */ + private String method; + + /* + * The user agent header of the request. + */ + private String useragent; + + /** + * Creates an instance of Request class. + */ + private Request() { + } + + /** + * Get the id property: The ID of the request that initiated the event. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event. + * This is the RemoteAddr from the standard http request. + * + * @return the addr value. + */ + public String addr() { + return this.addr; + } + + /** + * Get the host property: The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. + * + * @return the host value. + */ + public String host() { + return this.host; + } + + /** + * Get the method property: The request method that generated the event. + * + * @return the method value. + */ + public String method() { + return this.method; + } + + /** + * Get the useragent property: The user agent header of the request. + * + * @return the useragent value. + */ + public String useragent() { + return this.useragent; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("addr", this.addr); + jsonWriter.writeStringField("host", this.host); + jsonWriter.writeStringField("method", this.method); + jsonWriter.writeStringField("useragent", this.useragent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Request from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Request if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Request. + */ + public static Request fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Request deserializedRequest = new Request(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRequest.id = reader.getString(); + } else if ("addr".equals(fieldName)) { + deserializedRequest.addr = reader.getString(); + } else if ("host".equals(fieldName)) { + deserializedRequest.host = reader.getString(); + } else if ("method".equals(fieldName)) { + deserializedRequest.method = reader.getString(); + } else if ("useragent".equals(fieldName)) { + deserializedRequest.useragent = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRequest; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java new file mode 100644 index 000000000000..908bc142bf88 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +/** + * The identity type. + */ +public enum ResourceIdentityType { + /** + * Enum value SystemAssigned. + */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** + * Enum value UserAssigned. + */ + USER_ASSIGNED("UserAssigned"), + + /** + * Enum value SystemAssigned, UserAssigned. + */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** + * Enum value None. + */ + NONE("None"); + + /** + * The actual serialized value for a ResourceIdentityType instance. + */ + private final String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java new file mode 100644 index 000000000000..eb353c25902b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The retention policy for a container registry. + */ +@Fluent +public final class RetentionPolicy implements JsonSerializable { + /* + * The number of days to retain an untagged manifest after which it gets purged. + */ + private Integer days; + + /* + * The timestamp when the policy was last updated. + */ + private OffsetDateTime lastUpdatedTime; + + /* + * The value that indicates whether the policy is enabled or not. + */ + private PolicyStatus status; + + /** + * Creates an instance of RetentionPolicy class. + */ + public RetentionPolicy() { + } + + /** + * Get the days property: The number of days to retain an untagged manifest after which it gets purged. + * + * @return the days value. + */ + public Integer days() { + return this.days; + } + + /** + * Set the days property: The number of days to retain an untagged manifest after which it gets purged. + * + * @param days the days value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy withDays(Integer days) { + this.days = days; + return this; + } + + /** + * Get the lastUpdatedTime property: The timestamp when the policy was last updated. + * + * @return the lastUpdatedTime value. + */ + public OffsetDateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Get the status property: The value that indicates whether the policy is enabled or not. + * + * @return the status value. + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The value that indicates whether the policy is enabled or not. + * + * @param status the status value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("days", this.days); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RetentionPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RetentionPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RetentionPolicy. + */ + public static RetentionPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RetentionPolicy deserializedRetentionPolicy = new RetentionPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("days".equals(fieldName)) { + deserializedRetentionPolicy.days = reader.getNullable(JsonReader::getInt); + } else if ("lastUpdatedTime".equals(fieldName)) { + deserializedRetentionPolicy.lastUpdatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedRetentionPolicy.status = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRetentionPolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java new file mode 100644 index 000000000000..c73f2c7cd7a6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Determines registry role assignment mode. + */ +public final class RoleAssignmentMode extends ExpandableStringEnum { + /** + * Static value AbacRepositoryPermissions for RoleAssignmentMode. + */ + public static final RoleAssignmentMode ABAC_REPOSITORY_PERMISSIONS = fromString("AbacRepositoryPermissions"); + + /** + * Static value LegacyRegistryPermissions for RoleAssignmentMode. + */ + public static final RoleAssignmentMode LEGACY_REGISTRY_PERMISSIONS = fromString("LegacyRegistryPermissions"); + + /** + * Creates a new instance of RoleAssignmentMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoleAssignmentMode() { + } + + /** + * Creates or finds a RoleAssignmentMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoleAssignmentMode. + */ + public static RoleAssignmentMode fromString(String name) { + return fromString(name, RoleAssignmentMode.class); + } + + /** + * Gets known RoleAssignmentMode values. + * + * @return known RoleAssignmentMode values. + */ + public static Collection values() { + return values(RoleAssignmentMode.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java new file mode 100644 index 000000000000..2d72a884f772 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import java.util.List; + +/** + * An immutable client-side representation of ScopeMap. + */ +public interface ScopeMap { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of the scope map. + * + * @return the properties value. + */ + ScopeMapProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner object. + * + * @return the inner object. + */ + ScopeMapInner innerModel(); + + /** + * The entirety of the ScopeMap definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ScopeMap definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ScopeMap definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ScopeMap definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the ScopeMap 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ScopeMap create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ScopeMap create(Context context); + } + + /** + * The stage of the ScopeMap definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the scope map.. + * + * @param properties The properties of the scope map. + * @return the next definition stage. + */ + WithCreate withProperties(ScopeMapProperties properties); + } + } + + /** + * Begins update for the ScopeMap resource. + * + * @return the stage of resource update. + */ + ScopeMap.Update update(); + + /** + * The template for ScopeMap update. + */ + interface Update extends UpdateStages.WithDescription, UpdateStages.WithActions { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ScopeMap apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ScopeMap apply(Context context); + } + + /** + * The ScopeMap update stages. + */ + interface UpdateStages { + /** + * The stage of the ScopeMap update allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: The user friendly description of the scope map.. + * + * @param description The user friendly description of the scope map. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** + * The stage of the ScopeMap update allowing to specify actions. + */ + interface WithActions { + /** + * Specifies the actions property: The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * + * @param actions The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * @return the next definition stage. + */ + Update withActions(List actions); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ScopeMap refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ScopeMap refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java new file mode 100644 index 000000000000..a082ec32b72b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The properties of a scope map. + */ +@Fluent +public final class ScopeMapProperties implements JsonSerializable { + /* + * The user friendly description of the scope map. + */ + private String description; + + /* + * The type of the scope map. E.g. BuildIn scope map. + */ + private String type; + + /* + * The creation date of scope map. + */ + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * The list of scoped permissions for registry artifacts. + * E.g. repositories/repository-name/content/read, + * repositories/repository-name/metadata/write + */ + private List actions; + + /** + * Creates an instance of ScopeMapProperties class. + */ + public ScopeMapProperties() { + } + + /** + * Get the description property: The user friendly description of the scope map. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The user friendly description of the scope map. + * + * @param description the description value to set. + * @return the ScopeMapProperties object itself. + */ + public ScopeMapProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the type property: The type of the scope map. E.g. BuildIn scope map. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the creationDate property: The creation date of scope map. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the actions property: The list of scoped permissions for registry artifacts. + * E.g. repositories/repository-name/content/read, + * repositories/repository-name/metadata/write. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The list of scoped permissions for registry artifacts. + * E.g. repositories/repository-name/content/read, + * repositories/repository-name/metadata/write. + * + * @param actions the actions value to set. + * @return the ScopeMapProperties object itself. + */ + public ScopeMapProperties withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopeMapProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopeMapProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScopeMapProperties. + */ + public static ScopeMapProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopeMapProperties deserializedScopeMapProperties = new ScopeMapProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedScopeMapProperties.actions = actions; + } else if ("description".equals(fieldName)) { + deserializedScopeMapProperties.description = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScopeMapProperties.type = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedScopeMapProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedScopeMapProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScopeMapProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java new file mode 100644 index 000000000000..a6ef5f213eee --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters; +import java.io.IOException; +import java.util.List; + +/** + * The properties for updating the scope map. + */ +@Fluent +public final class ScopeMapUpdateParameters implements JsonSerializable { + /* + * The update parameters for scope map properties. + */ + private ScopeMapPropertiesUpdateParameters innerProperties; + + /** + * Creates an instance of ScopeMapUpdateParameters class. + */ + public ScopeMapUpdateParameters() { + } + + /** + * Get the innerProperties property: The update parameters for scope map properties. + * + * @return the innerProperties value. + */ + private ScopeMapPropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: The user friendly description of the scope map. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The user friendly description of the scope map. + * + * @param description the description value to set. + * @return the ScopeMapUpdateParameters object itself. + */ + public ScopeMapUpdateParameters withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ScopeMapPropertiesUpdateParameters(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the actions property: The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * + * @return the actions value. + */ + public List actions() { + return this.innerProperties() == null ? null : this.innerProperties().actions(); + } + + /** + * Set the actions property: The list of scope permissions for registry artifacts. + * E.g. repositories/repository-name/pull, + * repositories/repository-name/delete. + * + * @param actions the actions value to set. + * @return the ScopeMapUpdateParameters object itself. + */ + public ScopeMapUpdateParameters withActions(List actions) { + if (this.innerProperties() == null) { + this.innerProperties = new ScopeMapPropertiesUpdateParameters(); + } + this.innerProperties().withActions(actions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScopeMapUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScopeMapUpdateParameters if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ScopeMapUpdateParameters. + */ + public static ScopeMapUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScopeMapUpdateParameters deserializedScopeMapUpdateParameters = new ScopeMapUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedScopeMapUpdateParameters.innerProperties + = ScopeMapPropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScopeMapUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java new file mode 100644 index 000000000000..ed562e02e63b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 ScopeMaps. + */ +public interface ScopeMaps { + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, + Context context); + + /** + * Gets the properties of the specified scope map. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 properties of the specified scope map. + */ + ScopeMap get(String resourceGroupName, String registryName, String scopeMapName); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 registryName, String scopeMapName); + + /** + * Deletes a scope map from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param scopeMapName The name of the scope map. + * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified scope map. + * + * @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 properties of the specified scope map along with {@link Response}. + */ + ScopeMap getById(String id); + + /** + * Gets the properties of the specified scope map. + * + * @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 properties of the specified scope map along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a scope map from a container registry. + * + * @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); + + /** + * Deletes a scope map from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ScopeMap resource. + * + * @param name resource name. + * @return the first stage of the new ScopeMap definition. + */ + ScopeMap.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java new file mode 100644 index 000000000000..2f0cc3214414 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SKU of a container registry. + */ +@Fluent +public final class Sku implements JsonSerializable { + /* + * The SKU name of the container registry. Required for registry creation. + */ + private SkuName name; + + /* + * The SKU tier based on the SKU name. + */ + private SkuTier tier; + + /** + * Creates an instance of Sku class. + */ + public Sku() { + } + + /** + * Get the name property: The SKU name of the container registry. Required for registry creation. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: The SKU name of the container registry. Required for registry creation. + * + * @param name the name value to set. + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The SKU tier based on the SKU name. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Sku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Sku if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Sku. + */ + public static Sku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Sku deserializedSku = new Sku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSku.name = SkuName.fromString(reader.getString()); + } else if ("tier".equals(fieldName)) { + deserializedSku.tier = SkuTier.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSku; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java new file mode 100644 index 000000000000..974b60b7df01 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The SKU name of the container registry. Required for registry creation. + */ +public final class SkuName extends ExpandableStringEnum { + /** + * Static value Classic for SkuName. + */ + public static final SkuName CLASSIC = fromString("Classic"); + + /** + * Static value Basic for SkuName. + */ + public static final SkuName BASIC = fromString("Basic"); + + /** + * Static value Standard for SkuName. + */ + public static final SkuName STANDARD = fromString("Standard"); + + /** + * Static value Premium for SkuName. + */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** + * Creates a new instance of SkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuName() { + } + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * Gets known SkuName values. + * + * @return known SkuName values. + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java new file mode 100644 index 000000000000..ab5582c09e00 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The SKU tier based on the SKU name. + */ +public final class SkuTier extends ExpandableStringEnum { + /** + * Static value Classic for SkuTier. + */ + public static final SkuTier CLASSIC = fromString("Classic"); + + /** + * Static value Basic for SkuTier. + */ + public static final SkuTier BASIC = fromString("Basic"); + + /** + * Static value Standard for SkuTier. + */ + public static final SkuTier STANDARD = fromString("Standard"); + + /** + * Static value Premium for SkuTier. + */ + public static final SkuTier PREMIUM = fromString("Premium"); + + /** + * Creates a new instance of SkuTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuTier() { + } + + /** + * Creates or finds a SkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuTier. + */ + public static SkuTier fromString(String name) { + return fromString(name, SkuTier.class); + } + + /** + * Gets known SkuTier values. + * + * @return known SkuTier values. + */ + public static Collection values() { + return values(SkuTier.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java new file mode 100644 index 000000000000..fcb9e666c186 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The registry node that generated the event. Put differently, while the actor initiates the event, the source + * generates it. + */ +@Immutable +public final class Source implements JsonSerializable { + /* + * The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved + * by os.Hostname() along with the running port. + */ + private String addr; + + /* + * The running instance of an application. Changes after each restart. + */ + private String instanceID; + + /** + * Creates an instance of Source class. + */ + private Source() { + } + + /** + * Get the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, + * this will be resolved by os.Hostname() along with the running port. + * + * @return the addr value. + */ + public String addr() { + return this.addr; + } + + /** + * Get the instanceID property: The running instance of an application. Changes after each restart. + * + * @return the instanceID value. + */ + public String instanceID() { + return this.instanceID; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("addr", this.addr); + jsonWriter.writeStringField("instanceID", this.instanceID); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Source from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Source if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Source. + */ + public static Source fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Source deserializedSource = new Source(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addr".equals(fieldName)) { + deserializedSource.addr = reader.getString(); + } else if ("instanceID".equals(fieldName)) { + deserializedSource.instanceID = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSource; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java new file mode 100644 index 000000000000..0c8bf5c59f03 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The status of an Azure resource at the time the operation was called. + */ +@Immutable +public final class Status implements JsonSerializable { + /* + * The short label for the status. + */ + private String displayStatus; + + /* + * The detailed message for the status, including alerts and error messages. + */ + private String message; + + /* + * The timestamp when the status was changed to the current value. + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of Status class. + */ + private Status() { + } + + /** + * Get the displayStatus property: The short label for the status. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Get the message property: The detailed message for the status, including alerts and error messages. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the timestamp property: The timestamp when the status was changed to the current value. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Status from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Status if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Status. + */ + public static Status fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Status deserializedStatus = new Status(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayStatus".equals(fieldName)) { + deserializedStatus.displayStatus = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedStatus.message = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedStatus.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedStatus; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java new file mode 100644 index 000000000000..102b2a4302ae --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The status detail properties of the connected registry. + */ +@Immutable +public final class StatusDetailProperties implements JsonSerializable { + /* + * The component of the connected registry corresponding to the status. + */ + private String type; + + /* + * The HTTP status code. + */ + private String code; + + /* + * The description of the status. + */ + private String description; + + /* + * The timestamp of the status. + */ + private OffsetDateTime timestamp; + + /* + * The correlation ID of the status. + */ + private String correlationId; + + /** + * Creates an instance of StatusDetailProperties class. + */ + private StatusDetailProperties() { + } + + /** + * Get the type property: The component of the connected registry corresponding to the status. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the code property: The HTTP status code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the description property: The description of the status. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the timestamp property: The timestamp of the status. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Get the correlationId property: The correlation ID of the status. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.correlationId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatusDetailProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatusDetailProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the StatusDetailProperties. + */ + public static StatusDetailProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatusDetailProperties deserializedStatusDetailProperties = new StatusDetailProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedStatusDetailProperties.type = reader.getString(); + } else if ("code".equals(fieldName)) { + deserializedStatusDetailProperties.code = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedStatusDetailProperties.description = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedStatusDetailProperties.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("correlationId".equals(fieldName)) { + deserializedStatusDetailProperties.correlationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStatusDetailProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java new file mode 100644 index 000000000000..62e806b3d76e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; +import java.time.OffsetDateTime; + +/** + * The sync properties of the connected registry with its parent. + */ +@Fluent +public final class SyncProperties implements JsonSerializable { + /* + * The resource ID of the ACR token used to authenticate the connected registry to its parent during sync. + */ + private String tokenId; + + /* + * The cron expression indicating the schedule that the connected registry will sync with its parent. + */ + private String schedule; + + /* + * The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format + * P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + */ + private Duration syncWindow; + + /* + * The period of time for which a message is available to sync before it is expired. Specify the duration using the + * format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + */ + private Duration messageTtl; + + /* + * The last time a sync occurred between the connected registry and its parent. + */ + private OffsetDateTime lastSyncTime; + + /* + * The gateway endpoint used by the connected registry to communicate with its parent. + */ + private String gatewayEndpoint; + + /** + * Creates an instance of SyncProperties class. + */ + public SyncProperties() { + } + + /** + * Get the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its + * parent during sync. + * + * @return the tokenId value. + */ + public String tokenId() { + return this.tokenId; + } + + /** + * Set the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its + * parent during sync. + * + * @param tokenId the tokenId value to set. + * @return the SyncProperties object itself. + */ + public SyncProperties withTokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + /** + * Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with + * its parent. + * + * @return the schedule value. + */ + public String schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with + * its parent. + * + * @param schedule the schedule value to set. + * @return the SyncProperties object itself. + */ + public SyncProperties withSchedule(String schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify + * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @return the syncWindow value. + */ + public Duration syncWindow() { + return this.syncWindow; + } + + /** + * Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify + * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @param syncWindow the syncWindow value to set. + * @return the SyncProperties object itself. + */ + public SyncProperties withSyncWindow(Duration syncWindow) { + this.syncWindow = syncWindow; + return this; + } + + /** + * Get the messageTtl property: The period of time for which a message is available to sync before it is expired. + * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @return the messageTtl value. + */ + public Duration messageTtl() { + return this.messageTtl; + } + + /** + * Set the messageTtl property: The period of time for which a message is available to sync before it is expired. + * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @param messageTtl the messageTtl value to set. + * @return the SyncProperties object itself. + */ + public SyncProperties withMessageTtl(Duration messageTtl) { + this.messageTtl = messageTtl; + return this; + } + + /** + * Get the lastSyncTime property: The last time a sync occurred between the connected registry and its parent. + * + * @return the lastSyncTime value. + */ + public OffsetDateTime lastSyncTime() { + return this.lastSyncTime; + } + + /** + * Get the gatewayEndpoint property: The gateway endpoint used by the connected registry to communicate with its + * parent. + * + * @return the gatewayEndpoint value. + */ + public String gatewayEndpoint() { + return this.gatewayEndpoint; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tokenId", this.tokenId); + jsonWriter.writeStringField("messageTtl", CoreUtils.durationToStringWithDays(this.messageTtl)); + jsonWriter.writeStringField("schedule", this.schedule); + jsonWriter.writeStringField("syncWindow", CoreUtils.durationToStringWithDays(this.syncWindow)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SyncProperties. + */ + public static SyncProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncProperties deserializedSyncProperties = new SyncProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tokenId".equals(fieldName)) { + deserializedSyncProperties.tokenId = reader.getString(); + } else if ("messageTtl".equals(fieldName)) { + deserializedSyncProperties.messageTtl + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("schedule".equals(fieldName)) { + deserializedSyncProperties.schedule = reader.getString(); + } else if ("syncWindow".equals(fieldName)) { + deserializedSyncProperties.syncWindow + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("lastSyncTime".equals(fieldName)) { + deserializedSyncProperties.lastSyncTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("gatewayEndpoint".equals(fieldName)) { + deserializedSyncProperties.gatewayEndpoint = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java new file mode 100644 index 000000000000..e50b81109c1a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; + +/** + * The parameters for updating the sync properties of the connected registry with its parent. + */ +@Fluent +public final class SyncUpdateProperties implements JsonSerializable { + /* + * The cron expression indicating the schedule that the connected registry will sync with its parent. + */ + private String schedule; + + /* + * The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format + * P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + */ + private Duration syncWindow; + + /* + * The period of time for which a message is available to sync before it is expired. Specify the duration using the + * format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + */ + private Duration messageTtl; + + /** + * Creates an instance of SyncUpdateProperties class. + */ + public SyncUpdateProperties() { + } + + /** + * Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with + * its parent. + * + * @return the schedule value. + */ + public String schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with + * its parent. + * + * @param schedule the schedule value to set. + * @return the SyncUpdateProperties object itself. + */ + public SyncUpdateProperties withSchedule(String schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify + * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @return the syncWindow value. + */ + public Duration syncWindow() { + return this.syncWindow; + } + + /** + * Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify + * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @param syncWindow the syncWindow value to set. + * @return the SyncUpdateProperties object itself. + */ + public SyncUpdateProperties withSyncWindow(Duration syncWindow) { + this.syncWindow = syncWindow; + return this; + } + + /** + * Get the messageTtl property: The period of time for which a message is available to sync before it is expired. + * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @return the messageTtl value. + */ + public Duration messageTtl() { + return this.messageTtl; + } + + /** + * Set the messageTtl property: The period of time for which a message is available to sync before it is expired. + * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + * + * @param messageTtl the messageTtl value to set. + * @return the SyncUpdateProperties object itself. + */ + public SyncUpdateProperties withMessageTtl(Duration messageTtl) { + this.messageTtl = messageTtl; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("schedule", this.schedule); + jsonWriter.writeStringField("syncWindow", CoreUtils.durationToStringWithDays(this.syncWindow)); + jsonWriter.writeStringField("messageTtl", CoreUtils.durationToStringWithDays(this.messageTtl)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncUpdateProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncUpdateProperties. + */ + public static SyncUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncUpdateProperties deserializedSyncUpdateProperties = new SyncUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedule".equals(fieldName)) { + deserializedSyncUpdateProperties.schedule = reader.getString(); + } else if ("syncWindow".equals(fieldName)) { + deserializedSyncUpdateProperties.syncWindow + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("messageTtl".equals(fieldName)) { + deserializedSyncUpdateProperties.messageTtl + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java new file mode 100644 index 000000000000..221b931c4528 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The target of the event. + */ +@Immutable +public final class Target implements JsonSerializable { + /* + * The MIME type of the referenced object. + */ + private String mediaType; + + /* + * The number of bytes of the content. Same as Length field. + */ + private Long size; + + /* + * The digest of the content, as defined by the Registry V2 HTTP API Specification. + */ + private String digest; + + /* + * The number of bytes of the content. Same as Size field. + */ + private Long length; + + /* + * The repository name. + */ + private String repository; + + /* + * The direct URL to the content. + */ + private String url; + + /* + * The tag name. + */ + private String tag; + + /* + * The name of the artifact. + */ + private String name; + + /* + * The version of the artifact. + */ + private String version; + + /** + * Creates an instance of Target class. + */ + private Target() { + } + + /** + * Get the mediaType property: The MIME type of the referenced object. + * + * @return the mediaType value. + */ + public String mediaType() { + return this.mediaType; + } + + /** + * Get the size property: The number of bytes of the content. Same as Length field. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Get the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. + * + * @return the digest value. + */ + public String digest() { + return this.digest; + } + + /** + * Get the length property: The number of bytes of the content. Same as Size field. + * + * @return the length value. + */ + public Long length() { + return this.length; + } + + /** + * Get the repository property: The repository name. + * + * @return the repository value. + */ + public String repository() { + return this.repository; + } + + /** + * Get the url property: The direct URL to the content. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Get the tag property: The tag name. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Get the name property: The name of the artifact. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the version property: The version of the artifact. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mediaType", this.mediaType); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("digest", this.digest); + jsonWriter.writeNumberField("length", this.length); + jsonWriter.writeStringField("repository", this.repository); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("tag", this.tag); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Target from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Target if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Target. + */ + public static Target fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Target deserializedTarget = new Target(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mediaType".equals(fieldName)) { + deserializedTarget.mediaType = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedTarget.size = reader.getNullable(JsonReader::getLong); + } else if ("digest".equals(fieldName)) { + deserializedTarget.digest = reader.getString(); + } else if ("length".equals(fieldName)) { + deserializedTarget.length = reader.getNullable(JsonReader::getLong); + } else if ("repository".equals(fieldName)) { + deserializedTarget.repository = reader.getString(); + } else if ("url".equals(fieldName)) { + deserializedTarget.url = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedTarget.tag = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTarget.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedTarget.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTarget; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java new file mode 100644 index 000000000000..25810fd5b69d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The TLS certificate properties of the connected registry login server. + */ +@Immutable +public final class TlsCertificateProperties implements JsonSerializable { + /* + * The type of certificate location. + */ + private CertificateType type; + + /* + * Indicates the location of the certificates. + */ + private String location; + + /** + * Creates an instance of TlsCertificateProperties class. + */ + private TlsCertificateProperties() { + } + + /** + * Get the type property: The type of certificate location. + * + * @return the type value. + */ + public CertificateType type() { + return this.type; + } + + /** + * Get the location property: Indicates the location of the certificates. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TlsCertificateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TlsCertificateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TlsCertificateProperties. + */ + public static TlsCertificateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TlsCertificateProperties deserializedTlsCertificateProperties = new TlsCertificateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedTlsCertificateProperties.type = CertificateType.fromString(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedTlsCertificateProperties.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTlsCertificateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java new file mode 100644 index 000000000000..bfbce7571bf9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The TLS properties of the connected registry login server. + */ +@Immutable +public final class TlsProperties implements JsonSerializable { + /* + * Indicates whether HTTPS is enabled for the login server. + */ + private TlsStatus status; + + /* + * The certificate used to configure HTTPS for the login server. + */ + private TlsCertificateProperties certificate; + + /** + * Creates an instance of TlsProperties class. + */ + private TlsProperties() { + } + + /** + * Get the status property: Indicates whether HTTPS is enabled for the login server. + * + * @return the status value. + */ + public TlsStatus status() { + return this.status; + } + + /** + * Get the certificate property: The certificate used to configure HTTPS for the login server. + * + * @return the certificate value. + */ + public TlsCertificateProperties certificate() { + return this.certificate; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TlsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TlsProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TlsProperties. + */ + public static TlsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TlsProperties deserializedTlsProperties = new TlsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedTlsProperties.status = TlsStatus.fromString(reader.getString()); + } else if ("certificate".equals(fieldName)) { + deserializedTlsProperties.certificate = TlsCertificateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTlsProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java new file mode 100644 index 000000000000..52162086011f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether HTTPS is enabled for the login server. + */ +public final class TlsStatus extends ExpandableStringEnum { + /** + * Static value Enabled for TlsStatus. + */ + public static final TlsStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for TlsStatus. + */ + public static final TlsStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of TlsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TlsStatus() { + } + + /** + * Creates or finds a TlsStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding TlsStatus. + */ + public static TlsStatus fromString(String name) { + return fromString(name, TlsStatus.class); + } + + /** + * Gets known TlsStatus values. + * + * @return known TlsStatus values. + */ + public static Collection values() { + return values(TlsStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java new file mode 100644 index 000000000000..18bffcc98b8d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; + +/** + * An immutable client-side representation of Token. + */ +public interface Token { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties of the token. + * + * @return the properties value. + */ + TokenProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner object. + * + * @return the inner object. + */ + TokenInner innerModel(); + + /** + * The entirety of the Token definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Token definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Token definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Token definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the Token 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Token create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Token create(Context context); + } + + /** + * The stage of the Token definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the token.. + * + * @param properties The properties of the token. + * @return the next definition stage. + */ + WithCreate withProperties(TokenProperties properties); + } + } + + /** + * Begins update for the Token resource. + * + * @return the stage of resource update. + */ + Token.Update update(); + + /** + * The template for Token update. + */ + interface Update extends UpdateStages.WithScopeMapId, UpdateStages.WithStatus, UpdateStages.WithCredentials { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Token apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Token apply(Context context); + } + + /** + * The Token update stages. + */ + interface UpdateStages { + /** + * The stage of the Token update allowing to specify scopeMapId. + */ + interface WithScopeMapId { + /** + * Specifies the scopeMapId property: The resource ID of the scope map to which the token will be associated + * with.. + * + * @param scopeMapId The resource ID of the scope map to which the token will be associated with. + * @return the next definition stage. + */ + Update withScopeMapId(String scopeMapId); + } + + /** + * The stage of the Token update allowing to specify status. + */ + interface WithStatus { + /** + * Specifies the status property: The status of the token example enabled or disabled.. + * + * @param status The status of the token example enabled or disabled. + * @return the next definition stage. + */ + Update withStatus(TokenStatus status); + } + + /** + * The stage of the Token update allowing to specify credentials. + */ + interface WithCredentials { + /** + * Specifies the credentials property: The credentials that can be used for authenticating the token.. + * + * @param credentials The credentials that can be used for authenticating the token. + * @return the next definition stage. + */ + Update withCredentials(TokenCredentialsProperties credentials); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Token refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Token refresh(Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java new file mode 100644 index 000000000000..bc409a221388 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The properties of a certificate used for authenticating a token. + */ +@Fluent +public final class TokenCertificate implements JsonSerializable { + /* + * The name property. + */ + private TokenCertificateName name; + + /* + * The expiry datetime of the certificate. + */ + private OffsetDateTime expiry; + + /* + * The thumbprint of the certificate. + */ + private String thumbprint; + + /* + * Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token. + */ + private String encodedPemCertificate; + + /** + * Creates an instance of TokenCertificate class. + */ + public TokenCertificate() { + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public TokenCertificateName name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the TokenCertificate object itself. + */ + public TokenCertificate withName(TokenCertificateName name) { + this.name = name; + return this; + } + + /** + * Get the expiry property: The expiry datetime of the certificate. + * + * @return the expiry value. + */ + public OffsetDateTime expiry() { + return this.expiry; + } + + /** + * Set the expiry property: The expiry datetime of the certificate. + * + * @param expiry the expiry value to set. + * @return the TokenCertificate object itself. + */ + public TokenCertificate withExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Get the thumbprint property: The thumbprint of the certificate. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint property: The thumbprint of the certificate. + * + * @param thumbprint the thumbprint value to set. + * @return the TokenCertificate object itself. + */ + public TokenCertificate withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the encodedPemCertificate property: Base 64 encoded string of the public certificate1 in PEM format that will + * be used for authenticating the token. + * + * @return the encodedPemCertificate value. + */ + public String encodedPemCertificate() { + return this.encodedPemCertificate; + } + + /** + * Set the encodedPemCertificate property: Base 64 encoded string of the public certificate1 in PEM format that will + * be used for authenticating the token. + * + * @param encodedPemCertificate the encodedPemCertificate value to set. + * @return the TokenCertificate object itself. + */ + public TokenCertificate withEncodedPemCertificate(String encodedPemCertificate) { + this.encodedPemCertificate = encodedPemCertificate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeStringField("expiry", + this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); + jsonWriter.writeStringField("thumbprint", this.thumbprint); + jsonWriter.writeStringField("encodedPemCertificate", this.encodedPemCertificate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenCertificate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenCertificate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenCertificate. + */ + public static TokenCertificate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenCertificate deserializedTokenCertificate = new TokenCertificate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedTokenCertificate.name = TokenCertificateName.fromString(reader.getString()); + } else if ("expiry".equals(fieldName)) { + deserializedTokenCertificate.expiry = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("thumbprint".equals(fieldName)) { + deserializedTokenCertificate.thumbprint = reader.getString(); + } else if ("encodedPemCertificate".equals(fieldName)) { + deserializedTokenCertificate.encodedPemCertificate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenCertificate; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java new file mode 100644 index 000000000000..0bd47a4f7467 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TokenCertificateName. + */ +public final class TokenCertificateName extends ExpandableStringEnum { + /** + * Static value certificate1 for TokenCertificateName. + */ + public static final TokenCertificateName CERTIFICATE1 = fromString("certificate1"); + + /** + * Static value certificate2 for TokenCertificateName. + */ + public static final TokenCertificateName CERTIFICATE2 = fromString("certificate2"); + + /** + * Creates a new instance of TokenCertificateName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TokenCertificateName() { + } + + /** + * Creates or finds a TokenCertificateName from its string representation. + * + * @param name a name to look for. + * @return the corresponding TokenCertificateName. + */ + public static TokenCertificateName fromString(String name) { + return fromString(name, TokenCertificateName.class); + } + + /** + * Gets known TokenCertificateName values. + * + * @return known TokenCertificateName values. + */ + public static Collection values() { + return values(TokenCertificateName.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java new file mode 100644 index 000000000000..784dec848c1f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of the credentials that can be used for authenticating the token. + */ +@Fluent +public final class TokenCredentialsProperties implements JsonSerializable { + /* + * The certificates property. + */ + private List certificates; + + /* + * The passwords property. + */ + private List passwords; + + /** + * Creates an instance of TokenCredentialsProperties class. + */ + public TokenCredentialsProperties() { + } + + /** + * Get the certificates property: The certificates property. + * + * @return the certificates value. + */ + public List certificates() { + return this.certificates; + } + + /** + * Set the certificates property: The certificates property. + * + * @param certificates the certificates value to set. + * @return the TokenCredentialsProperties object itself. + */ + public TokenCredentialsProperties withCertificates(List certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get the passwords property: The passwords property. + * + * @return the passwords value. + */ + public List passwords() { + return this.passwords; + } + + /** + * Set the passwords property: The passwords property. + * + * @param passwords the passwords value to set. + * @return the TokenCredentialsProperties object itself. + */ + public TokenCredentialsProperties withPasswords(List passwords) { + this.passwords = passwords; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("certificates", this.certificates, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenCredentialsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenCredentialsProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenCredentialsProperties. + */ + public static TokenCredentialsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenCredentialsProperties deserializedTokenCredentialsProperties = new TokenCredentialsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("certificates".equals(fieldName)) { + List certificates + = reader.readArray(reader1 -> TokenCertificate.fromJson(reader1)); + deserializedTokenCredentialsProperties.certificates = certificates; + } else if ("passwords".equals(fieldName)) { + List passwords = reader.readArray(reader1 -> TokenPassword.fromJson(reader1)); + deserializedTokenCredentialsProperties.passwords = passwords; + } else { + reader.skipChildren(); + } + } + + return deserializedTokenCredentialsProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java new file mode 100644 index 000000000000..729ab8f98a4b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The password that will be used for authenticating the token of a container registry. + */ +@Fluent +public final class TokenPassword implements JsonSerializable { + /* + * The creation datetime of the password. + */ + private OffsetDateTime creationTime; + + /* + * The expiry datetime of the password. + */ + private OffsetDateTime expiry; + + /* + * The password name "password1" or "password2" + */ + private TokenPasswordName name; + + /* + * The password value. + */ + private String value; + + /** + * Creates an instance of TokenPassword class. + */ + public TokenPassword() { + } + + /** + * Get the creationTime property: The creation datetime of the password. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.creationTime; + } + + /** + * Set the creationTime property: The creation datetime of the password. + * + * @param creationTime the creationTime value to set. + * @return the TokenPassword object itself. + */ + public TokenPassword withCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get the expiry property: The expiry datetime of the password. + * + * @return the expiry value. + */ + public OffsetDateTime expiry() { + return this.expiry; + } + + /** + * Set the expiry property: The expiry datetime of the password. + * + * @param expiry the expiry value to set. + * @return the TokenPassword object itself. + */ + public TokenPassword withExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Get the name property: The password name "password1" or "password2". + * + * @return the name value. + */ + public TokenPasswordName name() { + return this.name; + } + + /** + * Set the name property: The password name "password1" or "password2". + * + * @param name the name value to set. + * @return the TokenPassword object itself. + */ + public TokenPassword withName(TokenPasswordName name) { + this.name = name; + return this; + } + + /** + * Get the value property: The password value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("creationTime", + this.creationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTime)); + jsonWriter.writeStringField("expiry", + this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenPassword from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenPassword if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenPassword. + */ + public static TokenPassword fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenPassword deserializedTokenPassword = new TokenPassword(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationTime".equals(fieldName)) { + deserializedTokenPassword.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("expiry".equals(fieldName)) { + deserializedTokenPassword.expiry = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedTokenPassword.name = TokenPasswordName.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedTokenPassword.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenPassword; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java new file mode 100644 index 000000000000..c1bca1922745 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The password name "password1" or "password2". + */ +public final class TokenPasswordName extends ExpandableStringEnum { + /** + * Static value password1 for TokenPasswordName. + */ + public static final TokenPasswordName PASSWORD1 = fromString("password1"); + + /** + * Static value password2 for TokenPasswordName. + */ + public static final TokenPasswordName PASSWORD2 = fromString("password2"); + + /** + * Creates a new instance of TokenPasswordName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TokenPasswordName() { + } + + /** + * Creates or finds a TokenPasswordName from its string representation. + * + * @param name a name to look for. + * @return the corresponding TokenPasswordName. + */ + public static TokenPasswordName fromString(String name) { + return fromString(name, TokenPasswordName.class); + } + + /** + * Gets known TokenPasswordName values. + * + * @return known TokenPasswordName values. + */ + public static Collection values() { + return values(TokenPasswordName.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java new file mode 100644 index 000000000000..e4c5a8d72129 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The properties of a token. + */ +@Fluent +public final class TokenProperties implements JsonSerializable { + /* + * The creation date of scope map. + */ + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * The resource ID of the scope map to which the token will be associated with. + */ + private String scopeMapId; + + /* + * The credentials that can be used for authenticating the token. + */ + private TokenCredentialsProperties credentials; + + /* + * The status of the token example enabled or disabled. + */ + private TokenStatus status; + + /** + * Creates an instance of TokenProperties class. + */ + public TokenProperties() { + } + + /** + * Get the creationDate property: The creation date of scope map. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @return the scopeMapId value. + */ + public String scopeMapId() { + return this.scopeMapId; + } + + /** + * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @param scopeMapId the scopeMapId value to set. + * @return the TokenProperties object itself. + */ + public TokenProperties withScopeMapId(String scopeMapId) { + this.scopeMapId = scopeMapId; + return this; + } + + /** + * Get the credentials property: The credentials that can be used for authenticating the token. + * + * @return the credentials value. + */ + public TokenCredentialsProperties credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials that can be used for authenticating the token. + * + * @param credentials the credentials value to set. + * @return the TokenProperties object itself. + */ + public TokenProperties withCredentials(TokenCredentialsProperties credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the status property: The status of the token example enabled or disabled. + * + * @return the status value. + */ + public TokenStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the token example enabled or disabled. + * + * @param status the status value to set. + * @return the TokenProperties object itself. + */ + public TokenProperties withStatus(TokenStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scopeMapId", this.scopeMapId); + jsonWriter.writeJsonField("credentials", this.credentials); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenProperties. + */ + public static TokenProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenProperties deserializedTokenProperties = new TokenProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationDate".equals(fieldName)) { + deserializedTokenProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedTokenProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("scopeMapId".equals(fieldName)) { + deserializedTokenProperties.scopeMapId = reader.getString(); + } else if ("credentials".equals(fieldName)) { + deserializedTokenProperties.credentials = TokenCredentialsProperties.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedTokenProperties.status = TokenStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java new file mode 100644 index 000000000000..aaa50053528a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the token example enabled or disabled. + */ +public final class TokenStatus extends ExpandableStringEnum { + /** + * Static value enabled for TokenStatus. + */ + public static final TokenStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for TokenStatus. + */ + public static final TokenStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of TokenStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TokenStatus() { + } + + /** + * Creates or finds a TokenStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding TokenStatus. + */ + public static TokenStatus fromString(String name) { + return fromString(name, TokenStatus.class); + } + + /** + * Gets known TokenStatus values. + * + * @return known TokenStatus values. + */ + public static Collection values() { + return values(TokenStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java new file mode 100644 index 000000000000..56f18e2d3d88 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties; +import java.io.IOException; + +/** + * The parameters for updating a token. + */ +@Fluent +public final class TokenUpdateParameters implements JsonSerializable { + /* + * The properties of the token update parameters. + */ + private TokenUpdateProperties innerProperties; + + /** + * Creates an instance of TokenUpdateParameters class. + */ + public TokenUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the token update parameters. + * + * @return the innerProperties value. + */ + private TokenUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @return the scopeMapId value. + */ + public String scopeMapId() { + return this.innerProperties() == null ? null : this.innerProperties().scopeMapId(); + } + + /** + * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. + * + * @param scopeMapId the scopeMapId value to set. + * @return the TokenUpdateParameters object itself. + */ + public TokenUpdateParameters withScopeMapId(String scopeMapId) { + if (this.innerProperties() == null) { + this.innerProperties = new TokenUpdateProperties(); + } + this.innerProperties().withScopeMapId(scopeMapId); + return this; + } + + /** + * Get the status property: The status of the token example enabled or disabled. + * + * @return the status value. + */ + public TokenStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status of the token example enabled or disabled. + * + * @param status the status value to set. + * @return the TokenUpdateParameters object itself. + */ + public TokenUpdateParameters withStatus(TokenStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new TokenUpdateProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the credentials property: The credentials that can be used for authenticating the token. + * + * @return the credentials value. + */ + public TokenCredentialsProperties credentials() { + return this.innerProperties() == null ? null : this.innerProperties().credentials(); + } + + /** + * Set the credentials property: The credentials that can be used for authenticating the token. + * + * @param credentials the credentials value to set. + * @return the TokenUpdateParameters object itself. + */ + public TokenUpdateParameters withCredentials(TokenCredentialsProperties credentials) { + if (this.innerProperties() == null) { + this.innerProperties = new TokenUpdateProperties(); + } + this.innerProperties().withCredentials(credentials); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenUpdateParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TokenUpdateParameters. + */ + public static TokenUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenUpdateParameters deserializedTokenUpdateParameters = new TokenUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedTokenUpdateParameters.innerProperties = TokenUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java new file mode 100644 index 000000000000..c15fa8932ec6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 Tokens. + */ +public interface Tokens { + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String tokenName, Context context); + + /** + * Gets the properties of the specified token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 properties of the specified token. + */ + Token get(String resourceGroupName, String registryName, String tokenName); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 registryName, String tokenName); + + /** + * Deletes a token from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param tokenName The name of the token. + * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified token. + * + * @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 properties of the specified token along with {@link Response}. + */ + Token getById(String id); + + /** + * Gets the properties of the specified token. + * + * @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 properties of the specified token along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a token from a container registry. + * + * @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); + + /** + * Deletes a token from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Token resource. + * + * @param name resource name. + * @return the first stage of the new Token definition. + */ + Token.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java new file mode 100644 index 000000000000..f274f6f3d7fa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The content trust policy for a container registry. + */ +@Fluent +public final class TrustPolicy implements JsonSerializable { + /* + * The type of trust policy. + */ + private TrustPolicyType type; + + /* + * The value that indicates whether the policy is enabled or not. + */ + private PolicyStatus status; + + /** + * Creates an instance of TrustPolicy class. + */ + public TrustPolicy() { + } + + /** + * Get the type property: The type of trust policy. + * + * @return the type value. + */ + public TrustPolicyType type() { + return this.type; + } + + /** + * Set the type property: The type of trust policy. + * + * @param type the type value to set. + * @return the TrustPolicy object itself. + */ + public TrustPolicy withType(TrustPolicyType type) { + this.type = type; + return this; + } + + /** + * Get the status property: The value that indicates whether the policy is enabled or not. + * + * @return the status value. + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The value that indicates whether the policy is enabled or not. + * + * @param status the status value to set. + * @return the TrustPolicy object itself. + */ + public TrustPolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TrustPolicy. + */ + public static TrustPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustPolicy deserializedTrustPolicy = new TrustPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedTrustPolicy.type = TrustPolicyType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedTrustPolicy.status = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTrustPolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java new file mode 100644 index 000000000000..de08fe200c67 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of trust policy. + */ +public final class TrustPolicyType extends ExpandableStringEnum { + /** + * Static value Notary for TrustPolicyType. + */ + public static final TrustPolicyType NOTARY = fromString("Notary"); + + /** + * Creates a new instance of TrustPolicyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TrustPolicyType() { + } + + /** + * Creates or finds a TrustPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrustPolicyType. + */ + public static TrustPolicyType fromString(String name) { + return fromString(name, TrustPolicyType.class); + } + + /** + * Gets known TrustPolicyType values. + * + * @return known TrustPolicyType values. + */ + public static Collection values() { + return values(TrustPolicyType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java new file mode 100644 index 000000000000..a67e4f053eb9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The UserIdentityProperties model. + */ +@Immutable +public final class UserIdentityProperties implements JsonSerializable { + /* + * The principal id of user assigned identity. + */ + private String principalId; + + /* + * The client id of user assigned identity. + */ + private String clientId; + + /** + * Creates an instance of UserIdentityProperties class. + */ + public UserIdentityProperties() { + } + + /** + * Get the principalId property: The principal id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserIdentityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserIdentityProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserIdentityProperties. + */ + public static UserIdentityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserIdentityProperties deserializedUserIdentityProperties = new UserIdentityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserIdentityProperties.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserIdentityProperties.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserIdentityProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java new file mode 100644 index 000000000000..97a84720dd55 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Webhook. + */ +public interface Webhook { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The properties of the webhook. + * + * @return the properties value. + */ + WebhookProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.containerregistry.generated.fluent.models.WebhookInner object. + * + * @return the inner object. + */ + WebhookInner innerModel(); + + /** + * The entirety of the Webhook definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Webhook definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Webhook definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Webhook definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The location of the webhook. This cannot be changed after the resource is created. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The location of the webhook. This cannot be changed after the resource is created. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the Webhook definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, registryName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @return the next definition stage. + */ + WithCreate withExistingRegistry(String resourceGroupName, String registryName); + } + + /** + * The stage of the Webhook 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.WithServiceUri, DefinitionStages.WithCustomHeaders, + DefinitionStages.WithStatus, DefinitionStages.WithScope, DefinitionStages.WithActions { + /** + * Executes the create request. + * + * @return the created resource. + */ + Webhook create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Webhook create(Context context); + } + + /** + * The stage of the Webhook definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags for the webhook.. + * + * @param tags The tags for the webhook. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Webhook definition allowing to specify serviceUri. + */ + interface WithServiceUri { + /** + * Specifies the serviceUri property: The service URI for the webhook to post notifications.. + * + * @param serviceUri The service URI for the webhook to post notifications. + * @return the next definition stage. + */ + WithCreate withServiceUri(String serviceUri); + } + + /** + * The stage of the Webhook definition allowing to specify customHeaders. + */ + interface WithCustomHeaders { + /** + * Specifies the customHeaders property: Custom headers that will be added to the webhook notifications.. + * + * @param customHeaders Custom headers that will be added to the webhook notifications. + * @return the next definition stage. + */ + WithCreate withCustomHeaders(Map customHeaders); + } + + /** + * The stage of the Webhook definition allowing to specify status. + */ + interface WithStatus { + /** + * Specifies the status property: The status of the webhook at the time the operation was called.. + * + * @param status The status of the webhook at the time the operation was called. + * @return the next definition stage. + */ + WithCreate withStatus(WebhookStatus status); + } + + /** + * The stage of the Webhook definition allowing to specify scope. + */ + interface WithScope { + /** + * Specifies the scope property: The scope of repositories where the event can be triggered. For example, + * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + * 'foo' is equivalent to 'foo:latest'. Empty means all events.. + * + * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + * @return the next definition stage. + */ + WithCreate withScope(String scope); + } + + /** + * The stage of the Webhook definition allowing to specify actions. + */ + interface WithActions { + /** + * Specifies the actions property: The list of actions that trigger the webhook to post notifications.. + * + * @param actions The list of actions that trigger the webhook to post notifications. + * @return the next definition stage. + */ + WithCreate withActions(List actions); + } + } + + /** + * Begins update for the Webhook resource. + * + * @return the stage of resource update. + */ + Webhook.Update update(); + + /** + * The template for Webhook update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithServiceUri, UpdateStages.WithCustomHeaders, + UpdateStages.WithStatus, UpdateStages.WithScope, UpdateStages.WithActions { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Webhook apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Webhook apply(Context context); + } + + /** + * The Webhook update stages. + */ + interface UpdateStages { + /** + * The stage of the Webhook update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags for the webhook.. + * + * @param tags The tags for the webhook. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the Webhook update allowing to specify serviceUri. + */ + interface WithServiceUri { + /** + * Specifies the serviceUri property: The service URI for the webhook to post notifications.. + * + * @param serviceUri The service URI for the webhook to post notifications. + * @return the next definition stage. + */ + Update withServiceUri(String serviceUri); + } + + /** + * The stage of the Webhook update allowing to specify customHeaders. + */ + interface WithCustomHeaders { + /** + * Specifies the customHeaders property: Custom headers that will be added to the webhook notifications.. + * + * @param customHeaders Custom headers that will be added to the webhook notifications. + * @return the next definition stage. + */ + Update withCustomHeaders(Map customHeaders); + } + + /** + * The stage of the Webhook update allowing to specify status. + */ + interface WithStatus { + /** + * Specifies the status property: The status of the webhook at the time the operation was called.. + * + * @param status The status of the webhook at the time the operation was called. + * @return the next definition stage. + */ + Update withStatus(WebhookStatus status); + } + + /** + * The stage of the Webhook update allowing to specify scope. + */ + interface WithScope { + /** + * Specifies the scope property: The scope of repositories where the event can be triggered. For example, + * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + * 'foo' is equivalent to 'foo:latest'. Empty means all events.. + * + * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + * equivalent to 'foo:latest'. Empty means all events. + * @return the next definition stage. + */ + Update withScope(String scope); + } + + /** + * The stage of the Webhook update allowing to specify actions. + */ + interface WithActions { + /** + * Specifies the actions property: The list of actions that trigger the webhook to post notifications.. + * + * @param actions The list of actions that trigger the webhook to post notifications. + * @return the next definition stage. + */ + Update withActions(List actions); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Webhook refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Webhook refresh(Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @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 basic information of an event along with {@link Response}. + */ + Response pingWithResponse(Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @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 basic information of an event. + */ + EventInfo ping(); + + /** + * Lists recent events for the specified webhook. + * + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + PagedIterable listEvents(); + + /** + * Lists recent events for the specified webhook. + * + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + PagedIterable listEvents(Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. + */ + Response getCallbackConfigWithResponse(Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @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 configuration of service URI and custom headers for the webhook. + */ + CallbackConfig getCallbackConfig(); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java new file mode 100644 index 000000000000..d40ee0d17134 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for WebhookAction. + */ +public final class WebhookAction extends ExpandableStringEnum { + /** + * Static value push for WebhookAction. + */ + public static final WebhookAction PUSH = fromString("push"); + + /** + * Static value delete for WebhookAction. + */ + public static final WebhookAction DELETE = fromString("delete"); + + /** + * Static value quarantine for WebhookAction. + */ + public static final WebhookAction QUARANTINE = fromString("quarantine"); + + /** + * Static value chart_push for WebhookAction. + */ + public static final WebhookAction CHART_PUSH = fromString("chart_push"); + + /** + * Static value chart_delete for WebhookAction. + */ + public static final WebhookAction CHART_DELETE = fromString("chart_delete"); + + /** + * Creates a new instance of WebhookAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebhookAction() { + } + + /** + * Creates or finds a WebhookAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebhookAction. + */ + public static WebhookAction fromString(String name) { + return fromString(name, WebhookAction.class); + } + + /** + * Gets known WebhookAction values. + * + * @return known WebhookAction values. + */ + public static Collection values() { + return values(WebhookAction.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java new file mode 100644 index 000000000000..dd588d54c6b9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The parameters for creating a webhook. + */ +@Fluent +public final class WebhookCreateParameters implements JsonSerializable { + /* + * The tags for the webhook. + */ + private Map tags; + + /* + * The location of the webhook. This cannot be changed after the resource is created. + */ + private String location; + + /* + * The properties that the webhook will be created with. + */ + private WebhookPropertiesCreateParameters innerProperties; + + /** + * Creates an instance of WebhookCreateParameters class. + */ + public WebhookCreateParameters() { + } + + /** + * Get the tags property: The tags for the webhook. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags for the webhook. + * + * @param tags the tags value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The location of the webhook. This cannot be changed after the resource is created. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location of the webhook. This cannot be changed after the resource is created. + * + * @param location the location value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: The properties that the webhook will be created with. + * + * @return the innerProperties value. + */ + private WebhookPropertiesCreateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.innerProperties() == null ? null : this.innerProperties().serviceUri(); + } + + /** + * Set the serviceUri property: The service URI for the webhook to post notifications. + * + * @param serviceUri the serviceUri value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withServiceUri(String serviceUri) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesCreateParameters(); + } + this.innerProperties().withServiceUri(serviceUri); + return this; + } + + /** + * Get the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + public Map customHeaders() { + return this.innerProperties() == null ? null : this.innerProperties().customHeaders(); + } + + /** + * Set the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @param customHeaders the customHeaders value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withCustomHeaders(Map customHeaders) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesCreateParameters(); + } + this.innerProperties().withCustomHeaders(customHeaders); + return this; + } + + /** + * Get the status property: The status of the webhook at the time the operation was called. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status of the webhook at the time the operation was called. + * + * @param status the status value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withStatus(WebhookStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesCreateParameters(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @return the scope value. + */ + public String scope() { + return this.innerProperties() == null ? null : this.innerProperties().scope(); + } + + /** + * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @param scope the scope value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withScope(String scope) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesCreateParameters(); + } + this.innerProperties().withScope(scope); + return this; + } + + /** + * Get the actions property: The list of actions that trigger the webhook to post notifications. + * + * @return the actions value. + */ + public List actions() { + return this.innerProperties() == null ? null : this.innerProperties().actions(); + } + + /** + * Set the actions property: The list of actions that trigger the webhook to post notifications. + * + * @param actions the actions value to set. + * @return the WebhookCreateParameters object itself. + */ + public WebhookCreateParameters withActions(List actions) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesCreateParameters(); + } + this.innerProperties().withActions(actions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookCreateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookCreateParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebhookCreateParameters. + */ + public static WebhookCreateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookCreateParameters deserializedWebhookCreateParameters = new WebhookCreateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedWebhookCreateParameters.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWebhookCreateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedWebhookCreateParameters.innerProperties + = WebhookPropertiesCreateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookCreateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java new file mode 100644 index 000000000000..6fef3e35d99e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of a webhook. + */ +@Immutable +public final class WebhookProperties implements JsonSerializable { + /* + * The status of the webhook at the time the operation was called. + */ + private WebhookStatus status; + + /* + * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under + * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all + * events. + */ + private String scope; + + /* + * The list of actions that trigger the webhook to post notifications. + */ + private List actions; + + /* + * The provisioning state of the webhook at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of WebhookProperties class. + */ + private WebhookProperties() { + } + + /** + * Get the status property: The status of the webhook at the time the operation was called. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * Get the actions property: The list of actions that trigger the webhook to post notifications. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Get the provisioningState property: The provisioning state of the webhook at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("actions", this.actions, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("scope", this.scope); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebhookProperties. + */ + public static WebhookProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookProperties deserializedWebhookProperties = new WebhookProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); + deserializedWebhookProperties.actions = actions; + } else if ("status".equals(fieldName)) { + deserializedWebhookProperties.status = WebhookStatus.fromString(reader.getString()); + } else if ("scope".equals(fieldName)) { + deserializedWebhookProperties.scope = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedWebhookProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java new file mode 100644 index 000000000000..ec65eb717044 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the webhook at the time the operation was called. + */ +public final class WebhookStatus extends ExpandableStringEnum { + /** + * Static value enabled for WebhookStatus. + */ + public static final WebhookStatus ENABLED = fromString("enabled"); + + /** + * Static value disabled for WebhookStatus. + */ + public static final WebhookStatus DISABLED = fromString("disabled"); + + /** + * Creates a new instance of WebhookStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebhookStatus() { + } + + /** + * Creates or finds a WebhookStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebhookStatus. + */ + public static WebhookStatus fromString(String name) { + return fromString(name, WebhookStatus.class); + } + + /** + * Gets known WebhookStatus values. + * + * @return known WebhookStatus values. + */ + public static Collection values() { + return values(WebhookStatus.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java new file mode 100644 index 000000000000..4e892560b242 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The parameters for updating a webhook. + */ +@Fluent +public final class WebhookUpdateParameters implements JsonSerializable { + /* + * The tags for the webhook. + */ + private Map tags; + + /* + * The properties that the webhook will be updated with. + */ + private WebhookPropertiesUpdateParameters innerProperties; + + /** + * Creates an instance of WebhookUpdateParameters class. + */ + public WebhookUpdateParameters() { + } + + /** + * Get the tags property: The tags for the webhook. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags for the webhook. + * + * @param tags the tags value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The properties that the webhook will be updated with. + * + * @return the innerProperties value. + */ + private WebhookPropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the serviceUri property: The service URI for the webhook to post notifications. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.innerProperties() == null ? null : this.innerProperties().serviceUri(); + } + + /** + * Set the serviceUri property: The service URI for the webhook to post notifications. + * + * @param serviceUri the serviceUri value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withServiceUri(String serviceUri) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesUpdateParameters(); + } + this.innerProperties().withServiceUri(serviceUri); + return this; + } + + /** + * Get the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @return the customHeaders value. + */ + public Map customHeaders() { + return this.innerProperties() == null ? null : this.innerProperties().customHeaders(); + } + + /** + * Set the customHeaders property: Custom headers that will be added to the webhook notifications. + * + * @param customHeaders the customHeaders value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withCustomHeaders(Map customHeaders) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesUpdateParameters(); + } + this.innerProperties().withCustomHeaders(customHeaders); + return this; + } + + /** + * Get the status property: The status of the webhook at the time the operation was called. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status of the webhook at the time the operation was called. + * + * @param status the status value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withStatus(WebhookStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesUpdateParameters(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @return the scope value. + */ + public String scope() { + return this.innerProperties() == null ? null : this.innerProperties().scope(); + } + + /** + * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means + * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to + * 'foo:latest'. Empty means all events. + * + * @param scope the scope value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withScope(String scope) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesUpdateParameters(); + } + this.innerProperties().withScope(scope); + return this; + } + + /** + * Get the actions property: The list of actions that trigger the webhook to post notifications. + * + * @return the actions value. + */ + public List actions() { + return this.innerProperties() == null ? null : this.innerProperties().actions(); + } + + /** + * Set the actions property: The list of actions that trigger the webhook to post notifications. + * + * @param actions the actions value to set. + * @return the WebhookUpdateParameters object itself. + */ + public WebhookUpdateParameters withActions(List actions) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPropertiesUpdateParameters(); + } + this.innerProperties().withActions(actions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebhookUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebhookUpdateParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the WebhookUpdateParameters. + */ + public static WebhookUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebhookUpdateParameters deserializedWebhookUpdateParameters = new WebhookUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWebhookUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedWebhookUpdateParameters.innerProperties + = WebhookPropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebhookUpdateParameters; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java new file mode 100644 index 000000000000..c3664a760d25 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.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 Webhooks. + */ +public interface Webhooks { + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Gets the properties of the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 properties of the specified webhook. + */ + Webhook get(String resourceGroupName, String registryName, String webhookName); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 registryName, String webhookName); + + /** + * Deletes a webhook from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event along with {@link Response}. + */ + Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context); + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 basic information of an event. + */ + EventInfo ping(String resourceGroupName, String registryName, String webhookName); + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName); + + /** + * Lists recent events for the specified webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. + */ + PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. + */ + Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context); + + /** + * Gets the configuration of service URI and custom headers for the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @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 configuration of service URI and custom headers for the webhook. + */ + CallbackConfig getCallbackConfig(String resourceGroupName, String registryName, String webhookName); + + /** + * Gets the properties of the specified webhook. + * + * @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 properties of the specified webhook along with {@link Response}. + */ + Webhook getById(String id); + + /** + * Gets the properties of the specified webhook. + * + * @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 properties of the specified webhook along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a webhook from a container registry. + * + * @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); + + /** + * Deletes a webhook from a container registry. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Webhook resource. + * + * @param name resource name. + * @return the first stage of the new Webhook definition. + */ + Webhook.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java new file mode 100644 index 000000000000..7491efbdea66 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether or not zone redundancy is enabled for this container registry. + */ +public final class ZoneRedundancy extends ExpandableStringEnum { + /** + * Static value Enabled for ZoneRedundancy. + */ + public static final ZoneRedundancy ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for ZoneRedundancy. + */ + public static final ZoneRedundancy DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ZoneRedundancy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneRedundancy() { + } + + /** + * Creates or finds a ZoneRedundancy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZoneRedundancy. + */ + public static ZoneRedundancy fromString(String name) { + return fromString(name, ZoneRedundancy.class); + } + + /** + * Gets known ZoneRedundancy values. + * + * @return known ZoneRedundancy values. + */ + public static Collection values() { + return values(ZoneRedundancy.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java new file mode 100644 index 000000000000..72df85ec68d3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the data models for ContainerRegistry. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +package com.azure.resourcemanager.containerregistry.generated.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java new file mode 100644 index 000000000000..3c148de171c8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the classes for ContainerRegistry. + * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for + * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry + * components. + */ +package com.azure.resourcemanager.containerregistry.generated; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java new file mode 100644 index 000000000000..7cb04140c48b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.resourcemanager.containerregistry.generated { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.containerregistry.generated; + exports com.azure.resourcemanager.containerregistry.generated.fluent; + exports com.azure.resourcemanager.containerregistry.generated.fluent.models; + exports com.azure.resourcemanager.containerregistry.generated.models; + + opens com.azure.resourcemanager.containerregistry.generated.fluent.models to com.azure.core; + opens com.azure.resourcemanager.containerregistry.generated.models to com.azure.core; + opens com.azure.resourcemanager.containerregistry.generated.implementation.models to com.azure.core; +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json new file mode 100644 index 000000000000..049a9acdaf79 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json @@ -0,0 +1,264 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient": "Microsoft.ContainerRegistry.CacheRules", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginCreate": "Microsoft.ContainerRegistry.CacheRules.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginDelete": "Microsoft.ContainerRegistry.CacheRules.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginUpdate": "Microsoft.ContainerRegistry.CacheRules.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.create": "Microsoft.ContainerRegistry.CacheRules.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.delete": "Microsoft.ContainerRegistry.CacheRules.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.get": "Microsoft.ContainerRegistry.CacheRules.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.getWithResponse": "Microsoft.ContainerRegistry.CacheRules.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.list": "Microsoft.ContainerRegistry.CacheRules.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.update": "Microsoft.ContainerRegistry.CacheRules.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient": "Microsoft.ContainerRegistry.ConnectedRegistries", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginCreate": "Microsoft.ContainerRegistry.ConnectedRegistries.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDeactivate": "Microsoft.ContainerRegistry.ConnectedRegistries.deactivate", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDelete": "Microsoft.ContainerRegistry.ConnectedRegistries.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginUpdate": "Microsoft.ContainerRegistry.ConnectedRegistries.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.create": "Microsoft.ContainerRegistry.ConnectedRegistries.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.deactivate": "Microsoft.ContainerRegistry.ConnectedRegistries.deactivate", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.delete": "Microsoft.ContainerRegistry.ConnectedRegistries.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.get": "Microsoft.ContainerRegistry.ConnectedRegistries.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.getWithResponse": "Microsoft.ContainerRegistry.ConnectedRegistries.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.list": "Microsoft.ContainerRegistry.ConnectedRegistries.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.update": "Microsoft.ContainerRegistry.ConnectedRegistries.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient": "Microsoft.ContainerRegistry", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient": "Microsoft.ContainerRegistry.CredentialSets", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginCreate": "Microsoft.ContainerRegistry.CredentialSets.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginDelete": "Microsoft.ContainerRegistry.CredentialSets.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginUpdate": "Microsoft.ContainerRegistry.CredentialSets.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.create": "Microsoft.ContainerRegistry.CredentialSets.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.delete": "Microsoft.ContainerRegistry.CredentialSets.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.get": "Microsoft.ContainerRegistry.CredentialSets.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.getWithResponse": "Microsoft.ContainerRegistry.CredentialSets.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.list": "Microsoft.ContainerRegistry.CredentialSets.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.update": "Microsoft.ContainerRegistry.CredentialSets.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient": "Microsoft.ContainerRegistry.Operations", + "com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient.list": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient": "Microsoft.ContainerRegistry.PrivateEndpointConnections", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate": "Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginDelete": "Microsoft.ContainerRegistry.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.createOrUpdate": "Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.delete": "Microsoft.ContainerRegistry.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.get": "Microsoft.ContainerRegistry.PrivateEndpointConnections.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.getWithResponse": "Microsoft.ContainerRegistry.PrivateEndpointConnections.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.list": "Microsoft.ContainerRegistry.PrivateEndpointConnections.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient": "Microsoft.ContainerRegistry.Registries", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginCreate": "Microsoft.ContainerRegistry.Registries.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginDelete": "Microsoft.ContainerRegistry.Registries.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginGenerateCredentials": "Microsoft.ContainerRegistry.Registries.generateCredentials", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginImportImage": "Microsoft.ContainerRegistry.Registries.importImage", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginUpdate": "Microsoft.ContainerRegistry.Registries.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailability": "Microsoft.ContainerRegistry.Registries.checkNameAvailability", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailabilityWithResponse": "Microsoft.ContainerRegistry.Registries.checkNameAvailability", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.create": "Microsoft.ContainerRegistry.Registries.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.delete": "Microsoft.ContainerRegistry.Registries.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.generateCredentials": "Microsoft.ContainerRegistry.Registries.generateCredentials", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroup": "Microsoft.ContainerRegistry.Registries.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroupWithResponse": "Microsoft.ContainerRegistry.Registries.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResource": "Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResourceWithResponse": "Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.importImage": "Microsoft.ContainerRegistry.Registries.importImage", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.list": "Microsoft.ContainerRegistry.Registries.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listByResourceGroup": "Microsoft.ContainerRegistry.Registries.listByResourceGroup", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentials": "Microsoft.ContainerRegistry.Registries.listCredentials", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentialsWithResponse": "Microsoft.ContainerRegistry.Registries.listCredentials", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listPrivateLinkResources": "Microsoft.ContainerRegistry.PrivateLinkResources.listPrivateLinkResources", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsages": "Microsoft.ContainerRegistry.Registries.listUsages", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsagesWithResponse": "Microsoft.ContainerRegistry.Registries.listUsages", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredential": "Microsoft.ContainerRegistry.Registries.regenerateCredential", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredentialWithResponse": "Microsoft.ContainerRegistry.Registries.regenerateCredential", + "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.update": "Microsoft.ContainerRegistry.Registries.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient": "Microsoft.ContainerRegistry.Replications", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginCreate": "Microsoft.ContainerRegistry.Replications.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginDelete": "Microsoft.ContainerRegistry.Replications.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginUpdate": "Microsoft.ContainerRegistry.Replications.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.create": "Microsoft.ContainerRegistry.Replications.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.delete": "Microsoft.ContainerRegistry.Replications.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.get": "Microsoft.ContainerRegistry.Replications.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.getWithResponse": "Microsoft.ContainerRegistry.Replications.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.list": "Microsoft.ContainerRegistry.Replications.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.update": "Microsoft.ContainerRegistry.Replications.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient": "Microsoft.ContainerRegistry.ScopeMaps", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginCreate": "Microsoft.ContainerRegistry.ScopeMaps.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginDelete": "Microsoft.ContainerRegistry.ScopeMaps.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginUpdate": "Microsoft.ContainerRegistry.ScopeMaps.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.create": "Microsoft.ContainerRegistry.ScopeMaps.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.delete": "Microsoft.ContainerRegistry.ScopeMaps.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.get": "Microsoft.ContainerRegistry.ScopeMaps.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.getWithResponse": "Microsoft.ContainerRegistry.ScopeMaps.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.list": "Microsoft.ContainerRegistry.ScopeMaps.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.update": "Microsoft.ContainerRegistry.ScopeMaps.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient": "Microsoft.ContainerRegistry.Tokens", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginCreate": "Microsoft.ContainerRegistry.Tokens.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginDelete": "Microsoft.ContainerRegistry.Tokens.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginUpdate": "Microsoft.ContainerRegistry.Tokens.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.create": "Microsoft.ContainerRegistry.Tokens.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.delete": "Microsoft.ContainerRegistry.Tokens.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.get": "Microsoft.ContainerRegistry.Tokens.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.getWithResponse": "Microsoft.ContainerRegistry.Tokens.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.list": "Microsoft.ContainerRegistry.Tokens.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.update": "Microsoft.ContainerRegistry.Tokens.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient": "Microsoft.ContainerRegistry.Webhooks", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginCreate": "Microsoft.ContainerRegistry.Webhooks.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginDelete": "Microsoft.ContainerRegistry.Webhooks.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginUpdate": "Microsoft.ContainerRegistry.Webhooks.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.create": "Microsoft.ContainerRegistry.Webhooks.create", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.delete": "Microsoft.ContainerRegistry.Webhooks.delete", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.get": "Microsoft.ContainerRegistry.Webhooks.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfig": "Microsoft.ContainerRegistry.Webhooks.getCallbackConfig", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfigWithResponse": "Microsoft.ContainerRegistry.Webhooks.getCallbackConfig", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getWithResponse": "Microsoft.ContainerRegistry.Webhooks.get", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.list": "Microsoft.ContainerRegistry.Webhooks.list", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.listEvents": "Microsoft.ContainerRegistry.Webhooks.listEvents", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.ping": "Microsoft.ContainerRegistry.Webhooks.ping", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.pingWithResponse": "Microsoft.ContainerRegistry.Webhooks.ping", + "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.update": "Microsoft.ContainerRegistry.Webhooks.update", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner": "Microsoft.ContainerRegistry.CacheRule", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties": "Microsoft.ContainerRegistry.CacheRuleUpdateProperties", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner": "Microsoft.ContainerRegistry.CallbackConfig", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner": "Microsoft.ContainerRegistry.ConnectedRegistry", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties": "Microsoft.ContainerRegistry.ConnectedRegistryUpdateProperties", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner": "Microsoft.ContainerRegistry.CredentialSet", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties": "Microsoft.ContainerRegistry.CredentialSetUpdateProperties", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner": "Microsoft.ContainerRegistry.EventInfo", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner": "Microsoft.ContainerRegistry.Event", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner": "Microsoft.ContainerRegistry.GenerateCredentialsResult", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner": "Microsoft.ContainerRegistry.OperationDefinition", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition": "Microsoft.ContainerRegistry.OperationPropertiesDefinition", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner": "Microsoft.ContainerRegistry.PrivateEndpointConnection", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner": "Azure.ResourceManager.CommonTypes.PrivateLinkResource", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner": "Microsoft.ContainerRegistry.Registry", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner": "Microsoft.ContainerRegistry.RegistryListCredentialsResult", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner": "Microsoft.ContainerRegistry.RegistryNameStatus", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters": "Microsoft.ContainerRegistry.RegistryPropertiesUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner": "Microsoft.ContainerRegistry.RegistryUsageListResult", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner": "Microsoft.ContainerRegistry.Replication", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties": "Microsoft.ContainerRegistry.ReplicationUpdateParametersProperties", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner": "Microsoft.ContainerRegistry.ScopeMap", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters": "Microsoft.ContainerRegistry.ScopeMapPropertiesUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner": "Microsoft.ContainerRegistry.Token", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties": "Microsoft.ContainerRegistry.TokenUpdateProperties", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner": "Microsoft.ContainerRegistry.Webhook", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters": "Microsoft.ContainerRegistry.WebhookPropertiesCreateParameters", + "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters": "Microsoft.ContainerRegistry.WebhookPropertiesUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder": "Microsoft.ContainerRegistry", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult": "Microsoft.ContainerRegistry.CacheRulesListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult": "Microsoft.ContainerRegistry.ConnectedRegistryListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult": "Microsoft.ContainerRegistry.CredentialSetListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult": "Microsoft.ContainerRegistry.EventListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult": "Microsoft.ContainerRegistry.OperationListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult": "Microsoft.ContainerRegistry.PrivateEndpointConnectionListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult": "Microsoft.ContainerRegistry.PrivateLinkResourceListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult": "Microsoft.ContainerRegistry.RegistryListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult": "Microsoft.ContainerRegistry.ReplicationListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult": "Microsoft.ContainerRegistry.ScopeMapListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult": "Microsoft.ContainerRegistry.TokenListResult", + "com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult": "Microsoft.ContainerRegistry.WebhookListResult", + "com.azure.resourcemanager.containerregistry.generated.models.Action": "Microsoft.ContainerRegistry.Action", + "com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired": "Microsoft.ContainerRegistry.ActionsRequired", + "com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties": "Microsoft.ContainerRegistry.ActivationProperties", + "com.azure.resourcemanager.containerregistry.generated.models.ActivationStatus": "Microsoft.ContainerRegistry.ActivationStatus", + "com.azure.resourcemanager.containerregistry.generated.models.Actor": "Microsoft.ContainerRegistry.Actor", + "com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus": "Microsoft.ContainerRegistry.AuditLogStatus", + "com.azure.resourcemanager.containerregistry.generated.models.AuthCredential": "Microsoft.ContainerRegistry.AuthCredential", + "com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy": "Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicy", + "com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus": "Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicyStatus", + "com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties": "Microsoft.ContainerRegistry.CacheRuleProperties", + "com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters": "Microsoft.ContainerRegistry.CacheRuleUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.CertificateType": "Microsoft.ContainerRegistry.CertificateType", + "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode": "Microsoft.ContainerRegistry.ConnectedRegistryMode", + "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties": "Microsoft.ContainerRegistry.ConnectedRegistryProperties", + "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters": "Microsoft.ContainerRegistry.ConnectedRegistryUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.ConnectionState": "Microsoft.ContainerRegistry.ConnectionState", + "com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus": "Microsoft.ContainerRegistry.ConnectionStatus", + "com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType": "Microsoft.ContainerRegistry.ContainerRegistryResourceType", + "com.azure.resourcemanager.containerregistry.generated.models.CredentialHealth": "Microsoft.ContainerRegistry.CredentialHealth", + "com.azure.resourcemanager.containerregistry.generated.models.CredentialHealthStatus": "Microsoft.ContainerRegistry.CredentialHealthStatus", + "com.azure.resourcemanager.containerregistry.generated.models.CredentialName": "Microsoft.ContainerRegistry.CredentialName", + "com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties": "Microsoft.ContainerRegistry.CredentialSetProperties", + "com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters": "Microsoft.ContainerRegistry.CredentialSetUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.DefaultAction": "Microsoft.ContainerRegistry.DefaultAction", + "com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty": "Microsoft.ContainerRegistry.EncryptionProperty", + "com.azure.resourcemanager.containerregistry.generated.models.EncryptionStatus": "Microsoft.ContainerRegistry.EncryptionStatus", + "com.azure.resourcemanager.containerregistry.generated.models.EventContent": "Microsoft.ContainerRegistry.EventContent", + "com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage": "Microsoft.ContainerRegistry.EventRequestMessage", + "com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage": "Microsoft.ContainerRegistry.EventResponseMessage", + "com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy": "Microsoft.ContainerRegistry.ExportPolicy", + "com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus": "Microsoft.ContainerRegistry.ExportPolicyStatus", + "com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties": "Microsoft.ContainerRegistry.GarbageCollectionProperties", + "com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters": "Microsoft.ContainerRegistry.GenerateCredentialsParameters", + "com.azure.resourcemanager.containerregistry.generated.models.IPRule": "Microsoft.ContainerRegistry.IPRule", + "com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties": "Microsoft.ContainerRegistry.IdentityProperties", + "com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters": "Microsoft.ContainerRegistry.ImportImageParameters", + "com.azure.resourcemanager.containerregistry.generated.models.ImportMode": "Microsoft.ContainerRegistry.ImportMode", + "com.azure.resourcemanager.containerregistry.generated.models.ImportSource": "Microsoft.ContainerRegistry.ImportSource", + "com.azure.resourcemanager.containerregistry.generated.models.ImportSourceCredentials": "Microsoft.ContainerRegistry.ImportSourceCredentials", + "com.azure.resourcemanager.containerregistry.generated.models.KeyVaultProperties": "Microsoft.ContainerRegistry.KeyVaultProperties", + "com.azure.resourcemanager.containerregistry.generated.models.LogLevel": "Microsoft.ContainerRegistry.LogLevel", + "com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties": "Microsoft.ContainerRegistry.LoggingProperties", + "com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties": "Microsoft.ContainerRegistry.LoginServerProperties", + "com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions": "Microsoft.ContainerRegistry.NetworkRuleBypassOptions", + "com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet": "Microsoft.ContainerRegistry.NetworkRuleSet", + "com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition": "Microsoft.ContainerRegistry.OperationDisplayDefinition", + "com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition": "Microsoft.ContainerRegistry.OperationLogSpecificationDefinition", + "com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition": "Microsoft.ContainerRegistry.OperationMetricSpecificationDefinition", + "com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition": "Microsoft.ContainerRegistry.OperationServiceSpecificationDefinition", + "com.azure.resourcemanager.containerregistry.generated.models.ParentProperties": "Microsoft.ContainerRegistry.ParentProperties", + "com.azure.resourcemanager.containerregistry.generated.models.PasswordName": "Microsoft.ContainerRegistry.PasswordName", + "com.azure.resourcemanager.containerregistry.generated.models.Policies": "Microsoft.ContainerRegistry.Policies", + "com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus": "Microsoft.ContainerRegistry.PolicyStatus", + "com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint": "Microsoft.ContainerRegistry.PrivateEndpoint", + "com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties": "Microsoft.ContainerRegistry.PrivateEndpointConnectionProperties", + "com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState": "Microsoft.ContainerRegistry.PrivateLinkServiceConnectionState", + "com.azure.resourcemanager.containerregistry.generated.models.ProvisioningState": "Microsoft.ContainerRegistry.ProvisioningState", + "com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess": "Microsoft.ContainerRegistry.PublicNetworkAccess", + "com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy": "Microsoft.ContainerRegistry.QuarantinePolicy", + "com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters": "Microsoft.ContainerRegistry.RegenerateCredentialParameters", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest": "Microsoft.ContainerRegistry.RegistryNameCheckRequest", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword": "Microsoft.ContainerRegistry.RegistryPassword", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties": "Microsoft.ContainerRegistry.RegistryProperties", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters": "Microsoft.ContainerRegistry.RegistryUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage": "Microsoft.ContainerRegistry.RegistryUsage", + "com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit": "Microsoft.ContainerRegistry.RegistryUsageUnit", + "com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties": "Microsoft.ContainerRegistry.ReplicationProperties", + "com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters": "Microsoft.ContainerRegistry.ReplicationUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.Request": "Microsoft.ContainerRegistry.Request", + "com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType": "Microsoft.ContainerRegistry.ResourceIdentityType", + "com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy": "Microsoft.ContainerRegistry.RetentionPolicy", + "com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode": "Microsoft.ContainerRegistry.RoleAssignmentMode", + "com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties": "Microsoft.ContainerRegistry.ScopeMapProperties", + "com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters": "Microsoft.ContainerRegistry.ScopeMapUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.Sku": "Microsoft.ContainerRegistry.Sku", + "com.azure.resourcemanager.containerregistry.generated.models.SkuName": "Microsoft.ContainerRegistry.SkuName", + "com.azure.resourcemanager.containerregistry.generated.models.SkuTier": "Microsoft.ContainerRegistry.SkuTier", + "com.azure.resourcemanager.containerregistry.generated.models.Source": "Microsoft.ContainerRegistry.Source", + "com.azure.resourcemanager.containerregistry.generated.models.Status": "Microsoft.ContainerRegistry.Status", + "com.azure.resourcemanager.containerregistry.generated.models.StatusDetailProperties": "Microsoft.ContainerRegistry.StatusDetailProperties", + "com.azure.resourcemanager.containerregistry.generated.models.SyncProperties": "Microsoft.ContainerRegistry.SyncProperties", + "com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties": "Microsoft.ContainerRegistry.SyncUpdateProperties", + "com.azure.resourcemanager.containerregistry.generated.models.Target": "Microsoft.ContainerRegistry.Target", + "com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties": "Microsoft.ContainerRegistry.TlsCertificateProperties", + "com.azure.resourcemanager.containerregistry.generated.models.TlsProperties": "Microsoft.ContainerRegistry.TlsProperties", + "com.azure.resourcemanager.containerregistry.generated.models.TlsStatus": "Microsoft.ContainerRegistry.TlsStatus", + "com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate": "Microsoft.ContainerRegistry.TokenCertificate", + "com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName": "Microsoft.ContainerRegistry.TokenCertificateName", + "com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties": "Microsoft.ContainerRegistry.TokenCredentialsProperties", + "com.azure.resourcemanager.containerregistry.generated.models.TokenPassword": "Microsoft.ContainerRegistry.TokenPassword", + "com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName": "Microsoft.ContainerRegistry.TokenPasswordName", + "com.azure.resourcemanager.containerregistry.generated.models.TokenProperties": "Microsoft.ContainerRegistry.TokenProperties", + "com.azure.resourcemanager.containerregistry.generated.models.TokenStatus": "Microsoft.ContainerRegistry.TokenStatus", + "com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters": "Microsoft.ContainerRegistry.TokenUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy": "Microsoft.ContainerRegistry.TrustPolicy", + "com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType": "Microsoft.ContainerRegistry.TrustPolicyType", + "com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties": "Microsoft.ContainerRegistry.UserIdentityProperties", + "com.azure.resourcemanager.containerregistry.generated.models.WebhookAction": "Microsoft.ContainerRegistry.WebhookAction", + "com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters": "Microsoft.ContainerRegistry.WebhookCreateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties": "Microsoft.ContainerRegistry.WebhookProperties", + "com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus": "Microsoft.ContainerRegistry.WebhookStatus", + "com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters": "Microsoft.ContainerRegistry.WebhookUpdateParameters", + "com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy": "Microsoft.ContainerRegistry.ZoneRedundancy" + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json new file mode 100644 index 000000000000..b16a72dec8d3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-11-01","crossLanguageDefinitions":{"com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient":"Microsoft.ContainerRegistry.CacheRules","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginCreate":"Microsoft.ContainerRegistry.CacheRules.create","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginDelete":"Microsoft.ContainerRegistry.CacheRules.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginUpdate":"Microsoft.ContainerRegistry.CacheRules.update","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.create":"Microsoft.ContainerRegistry.CacheRules.create","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.delete":"Microsoft.ContainerRegistry.CacheRules.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.get":"Microsoft.ContainerRegistry.CacheRules.get","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.getWithResponse":"Microsoft.ContainerRegistry.CacheRules.get","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.list":"Microsoft.ContainerRegistry.CacheRules.list","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.update":"Microsoft.ContainerRegistry.CacheRules.update","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient":"Microsoft.ContainerRegistry.ConnectedRegistries","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginCreate":"Microsoft.ContainerRegistry.ConnectedRegistries.create","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDeactivate":"Microsoft.ContainerRegistry.ConnectedRegistries.deactivate","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDelete":"Microsoft.ContainerRegistry.ConnectedRegistries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginUpdate":"Microsoft.ContainerRegistry.ConnectedRegistries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.create":"Microsoft.ContainerRegistry.ConnectedRegistries.create","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.deactivate":"Microsoft.ContainerRegistry.ConnectedRegistries.deactivate","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.delete":"Microsoft.ContainerRegistry.ConnectedRegistries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.get":"Microsoft.ContainerRegistry.ConnectedRegistries.get","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.getWithResponse":"Microsoft.ContainerRegistry.ConnectedRegistries.get","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.list":"Microsoft.ContainerRegistry.ConnectedRegistries.list","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.update":"Microsoft.ContainerRegistry.ConnectedRegistries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient":"Microsoft.ContainerRegistry","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient":"Microsoft.ContainerRegistry.CredentialSets","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginCreate":"Microsoft.ContainerRegistry.CredentialSets.create","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginDelete":"Microsoft.ContainerRegistry.CredentialSets.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginUpdate":"Microsoft.ContainerRegistry.CredentialSets.update","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.create":"Microsoft.ContainerRegistry.CredentialSets.create","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.delete":"Microsoft.ContainerRegistry.CredentialSets.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.get":"Microsoft.ContainerRegistry.CredentialSets.get","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.getWithResponse":"Microsoft.ContainerRegistry.CredentialSets.get","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.list":"Microsoft.ContainerRegistry.CredentialSets.list","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.update":"Microsoft.ContainerRegistry.CredentialSets.update","com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient":"Microsoft.ContainerRegistry.Operations","com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient":"Microsoft.ContainerRegistry.PrivateEndpointConnections","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate":"Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.ContainerRegistry.PrivateEndpointConnections.delete","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.ContainerRegistry.PrivateEndpointConnections.delete","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.ContainerRegistry.PrivateEndpointConnections.get","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.ContainerRegistry.PrivateEndpointConnections.get","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.ContainerRegistry.PrivateEndpointConnections.list","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient":"Microsoft.ContainerRegistry.Registries","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginCreate":"Microsoft.ContainerRegistry.Registries.create","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginDelete":"Microsoft.ContainerRegistry.Registries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginGenerateCredentials":"Microsoft.ContainerRegistry.Registries.generateCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginImportImage":"Microsoft.ContainerRegistry.Registries.importImage","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginUpdate":"Microsoft.ContainerRegistry.Registries.update","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailability":"Microsoft.ContainerRegistry.Registries.checkNameAvailability","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailabilityWithResponse":"Microsoft.ContainerRegistry.Registries.checkNameAvailability","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.create":"Microsoft.ContainerRegistry.Registries.create","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.delete":"Microsoft.ContainerRegistry.Registries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.generateCredentials":"Microsoft.ContainerRegistry.Registries.generateCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroup":"Microsoft.ContainerRegistry.Registries.get","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroupWithResponse":"Microsoft.ContainerRegistry.Registries.get","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResource":"Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResourceWithResponse":"Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.importImage":"Microsoft.ContainerRegistry.Registries.importImage","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.list":"Microsoft.ContainerRegistry.Registries.list","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listByResourceGroup":"Microsoft.ContainerRegistry.Registries.listByResourceGroup","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentials":"Microsoft.ContainerRegistry.Registries.listCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentialsWithResponse":"Microsoft.ContainerRegistry.Registries.listCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listPrivateLinkResources":"Microsoft.ContainerRegistry.PrivateLinkResources.listPrivateLinkResources","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsages":"Microsoft.ContainerRegistry.Registries.listUsages","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsagesWithResponse":"Microsoft.ContainerRegistry.Registries.listUsages","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredential":"Microsoft.ContainerRegistry.Registries.regenerateCredential","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredentialWithResponse":"Microsoft.ContainerRegistry.Registries.regenerateCredential","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.update":"Microsoft.ContainerRegistry.Registries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient":"Microsoft.ContainerRegistry.Replications","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginCreate":"Microsoft.ContainerRegistry.Replications.create","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginDelete":"Microsoft.ContainerRegistry.Replications.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginUpdate":"Microsoft.ContainerRegistry.Replications.update","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.create":"Microsoft.ContainerRegistry.Replications.create","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.delete":"Microsoft.ContainerRegistry.Replications.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.get":"Microsoft.ContainerRegistry.Replications.get","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.getWithResponse":"Microsoft.ContainerRegistry.Replications.get","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.list":"Microsoft.ContainerRegistry.Replications.list","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.update":"Microsoft.ContainerRegistry.Replications.update","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient":"Microsoft.ContainerRegistry.ScopeMaps","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginCreate":"Microsoft.ContainerRegistry.ScopeMaps.create","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginDelete":"Microsoft.ContainerRegistry.ScopeMaps.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginUpdate":"Microsoft.ContainerRegistry.ScopeMaps.update","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.create":"Microsoft.ContainerRegistry.ScopeMaps.create","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.delete":"Microsoft.ContainerRegistry.ScopeMaps.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.get":"Microsoft.ContainerRegistry.ScopeMaps.get","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.getWithResponse":"Microsoft.ContainerRegistry.ScopeMaps.get","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.list":"Microsoft.ContainerRegistry.ScopeMaps.list","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.update":"Microsoft.ContainerRegistry.ScopeMaps.update","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient":"Microsoft.ContainerRegistry.Tokens","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginCreate":"Microsoft.ContainerRegistry.Tokens.create","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginDelete":"Microsoft.ContainerRegistry.Tokens.delete","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginUpdate":"Microsoft.ContainerRegistry.Tokens.update","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.create":"Microsoft.ContainerRegistry.Tokens.create","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.delete":"Microsoft.ContainerRegistry.Tokens.delete","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.get":"Microsoft.ContainerRegistry.Tokens.get","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.getWithResponse":"Microsoft.ContainerRegistry.Tokens.get","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.list":"Microsoft.ContainerRegistry.Tokens.list","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.update":"Microsoft.ContainerRegistry.Tokens.update","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient":"Microsoft.ContainerRegistry.Webhooks","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginCreate":"Microsoft.ContainerRegistry.Webhooks.create","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginDelete":"Microsoft.ContainerRegistry.Webhooks.delete","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginUpdate":"Microsoft.ContainerRegistry.Webhooks.update","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.create":"Microsoft.ContainerRegistry.Webhooks.create","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.delete":"Microsoft.ContainerRegistry.Webhooks.delete","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.get":"Microsoft.ContainerRegistry.Webhooks.get","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfig":"Microsoft.ContainerRegistry.Webhooks.getCallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfigWithResponse":"Microsoft.ContainerRegistry.Webhooks.getCallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getWithResponse":"Microsoft.ContainerRegistry.Webhooks.get","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.list":"Microsoft.ContainerRegistry.Webhooks.list","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.listEvents":"Microsoft.ContainerRegistry.Webhooks.listEvents","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.ping":"Microsoft.ContainerRegistry.Webhooks.ping","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.pingWithResponse":"Microsoft.ContainerRegistry.Webhooks.ping","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.update":"Microsoft.ContainerRegistry.Webhooks.update","com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner":"Microsoft.ContainerRegistry.CacheRule","com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties":"Microsoft.ContainerRegistry.CacheRuleUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner":"Microsoft.ContainerRegistry.CallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner":"Microsoft.ContainerRegistry.ConnectedRegistry","com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties":"Microsoft.ContainerRegistry.ConnectedRegistryUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner":"Microsoft.ContainerRegistry.CredentialSet","com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties":"Microsoft.ContainerRegistry.CredentialSetUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner":"Microsoft.ContainerRegistry.EventInfo","com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner":"Microsoft.ContainerRegistry.Event","com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner":"Microsoft.ContainerRegistry.GenerateCredentialsResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner":"Microsoft.ContainerRegistry.OperationDefinition","com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition":"Microsoft.ContainerRegistry.OperationPropertiesDefinition","com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner":"Microsoft.ContainerRegistry.PrivateEndpointConnection","com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner":"Azure.ResourceManager.CommonTypes.PrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner":"Microsoft.ContainerRegistry.Registry","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner":"Microsoft.ContainerRegistry.RegistryListCredentialsResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner":"Microsoft.ContainerRegistry.RegistryNameStatus","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters":"Microsoft.ContainerRegistry.RegistryPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner":"Microsoft.ContainerRegistry.RegistryUsageListResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner":"Microsoft.ContainerRegistry.Replication","com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties":"Microsoft.ContainerRegistry.ReplicationUpdateParametersProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner":"Microsoft.ContainerRegistry.ScopeMap","com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters":"Microsoft.ContainerRegistry.ScopeMapPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner":"Microsoft.ContainerRegistry.Token","com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties":"Microsoft.ContainerRegistry.TokenUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner":"Microsoft.ContainerRegistry.Webhook","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters":"Microsoft.ContainerRegistry.WebhookPropertiesCreateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters":"Microsoft.ContainerRegistry.WebhookPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder":"Microsoft.ContainerRegistry","com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult":"Microsoft.ContainerRegistry.CacheRulesListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult":"Microsoft.ContainerRegistry.ConnectedRegistryListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult":"Microsoft.ContainerRegistry.CredentialSetListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult":"Microsoft.ContainerRegistry.EventListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult":"Microsoft.ContainerRegistry.OperationListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.ContainerRegistry.PrivateEndpointConnectionListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult":"Microsoft.ContainerRegistry.PrivateLinkResourceListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult":"Microsoft.ContainerRegistry.RegistryListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult":"Microsoft.ContainerRegistry.ReplicationListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult":"Microsoft.ContainerRegistry.ScopeMapListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult":"Microsoft.ContainerRegistry.TokenListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult":"Microsoft.ContainerRegistry.WebhookListResult","com.azure.resourcemanager.containerregistry.generated.models.Action":"Microsoft.ContainerRegistry.Action","com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired":"Microsoft.ContainerRegistry.ActionsRequired","com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties":"Microsoft.ContainerRegistry.ActivationProperties","com.azure.resourcemanager.containerregistry.generated.models.ActivationStatus":"Microsoft.ContainerRegistry.ActivationStatus","com.azure.resourcemanager.containerregistry.generated.models.Actor":"Microsoft.ContainerRegistry.Actor","com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus":"Microsoft.ContainerRegistry.AuditLogStatus","com.azure.resourcemanager.containerregistry.generated.models.AuthCredential":"Microsoft.ContainerRegistry.AuthCredential","com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy":"Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicy","com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus":"Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties":"Microsoft.ContainerRegistry.CacheRuleProperties","com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters":"Microsoft.ContainerRegistry.CacheRuleUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.CertificateType":"Microsoft.ContainerRegistry.CertificateType","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode":"Microsoft.ContainerRegistry.ConnectedRegistryMode","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties":"Microsoft.ContainerRegistry.ConnectedRegistryProperties","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters":"Microsoft.ContainerRegistry.ConnectedRegistryUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.ConnectionState":"Microsoft.ContainerRegistry.ConnectionState","com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus":"Microsoft.ContainerRegistry.ConnectionStatus","com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType":"Microsoft.ContainerRegistry.ContainerRegistryResourceType","com.azure.resourcemanager.containerregistry.generated.models.CredentialHealth":"Microsoft.ContainerRegistry.CredentialHealth","com.azure.resourcemanager.containerregistry.generated.models.CredentialHealthStatus":"Microsoft.ContainerRegistry.CredentialHealthStatus","com.azure.resourcemanager.containerregistry.generated.models.CredentialName":"Microsoft.ContainerRegistry.CredentialName","com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties":"Microsoft.ContainerRegistry.CredentialSetProperties","com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters":"Microsoft.ContainerRegistry.CredentialSetUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.DefaultAction":"Microsoft.ContainerRegistry.DefaultAction","com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty":"Microsoft.ContainerRegistry.EncryptionProperty","com.azure.resourcemanager.containerregistry.generated.models.EncryptionStatus":"Microsoft.ContainerRegistry.EncryptionStatus","com.azure.resourcemanager.containerregistry.generated.models.EventContent":"Microsoft.ContainerRegistry.EventContent","com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage":"Microsoft.ContainerRegistry.EventRequestMessage","com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage":"Microsoft.ContainerRegistry.EventResponseMessage","com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy":"Microsoft.ContainerRegistry.ExportPolicy","com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus":"Microsoft.ContainerRegistry.ExportPolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties":"Microsoft.ContainerRegistry.GarbageCollectionProperties","com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters":"Microsoft.ContainerRegistry.GenerateCredentialsParameters","com.azure.resourcemanager.containerregistry.generated.models.IPRule":"Microsoft.ContainerRegistry.IPRule","com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties":"Microsoft.ContainerRegistry.IdentityProperties","com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters":"Microsoft.ContainerRegistry.ImportImageParameters","com.azure.resourcemanager.containerregistry.generated.models.ImportMode":"Microsoft.ContainerRegistry.ImportMode","com.azure.resourcemanager.containerregistry.generated.models.ImportSource":"Microsoft.ContainerRegistry.ImportSource","com.azure.resourcemanager.containerregistry.generated.models.ImportSourceCredentials":"Microsoft.ContainerRegistry.ImportSourceCredentials","com.azure.resourcemanager.containerregistry.generated.models.KeyVaultProperties":"Microsoft.ContainerRegistry.KeyVaultProperties","com.azure.resourcemanager.containerregistry.generated.models.LogLevel":"Microsoft.ContainerRegistry.LogLevel","com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties":"Microsoft.ContainerRegistry.LoggingProperties","com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties":"Microsoft.ContainerRegistry.LoginServerProperties","com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions":"Microsoft.ContainerRegistry.NetworkRuleBypassOptions","com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet":"Microsoft.ContainerRegistry.NetworkRuleSet","com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition":"Microsoft.ContainerRegistry.OperationDisplayDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition":"Microsoft.ContainerRegistry.OperationLogSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition":"Microsoft.ContainerRegistry.OperationMetricSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition":"Microsoft.ContainerRegistry.OperationServiceSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.ParentProperties":"Microsoft.ContainerRegistry.ParentProperties","com.azure.resourcemanager.containerregistry.generated.models.PasswordName":"Microsoft.ContainerRegistry.PasswordName","com.azure.resourcemanager.containerregistry.generated.models.Policies":"Microsoft.ContainerRegistry.Policies","com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus":"Microsoft.ContainerRegistry.PolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint":"Microsoft.ContainerRegistry.PrivateEndpoint","com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties":"Microsoft.ContainerRegistry.PrivateEndpointConnectionProperties","com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties":"Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties","com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState":"Microsoft.ContainerRegistry.PrivateLinkServiceConnectionState","com.azure.resourcemanager.containerregistry.generated.models.ProvisioningState":"Microsoft.ContainerRegistry.ProvisioningState","com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess":"Microsoft.ContainerRegistry.PublicNetworkAccess","com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy":"Microsoft.ContainerRegistry.QuarantinePolicy","com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters":"Microsoft.ContainerRegistry.RegenerateCredentialParameters","com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest":"Microsoft.ContainerRegistry.RegistryNameCheckRequest","com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword":"Microsoft.ContainerRegistry.RegistryPassword","com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties":"Microsoft.ContainerRegistry.RegistryProperties","com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters":"Microsoft.ContainerRegistry.RegistryUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage":"Microsoft.ContainerRegistry.RegistryUsage","com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit":"Microsoft.ContainerRegistry.RegistryUsageUnit","com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties":"Microsoft.ContainerRegistry.ReplicationProperties","com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters":"Microsoft.ContainerRegistry.ReplicationUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.Request":"Microsoft.ContainerRegistry.Request","com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType":"Microsoft.ContainerRegistry.ResourceIdentityType","com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy":"Microsoft.ContainerRegistry.RetentionPolicy","com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode":"Microsoft.ContainerRegistry.RoleAssignmentMode","com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties":"Microsoft.ContainerRegistry.ScopeMapProperties","com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters":"Microsoft.ContainerRegistry.ScopeMapUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.Sku":"Microsoft.ContainerRegistry.Sku","com.azure.resourcemanager.containerregistry.generated.models.SkuName":"Microsoft.ContainerRegistry.SkuName","com.azure.resourcemanager.containerregistry.generated.models.SkuTier":"Microsoft.ContainerRegistry.SkuTier","com.azure.resourcemanager.containerregistry.generated.models.Source":"Microsoft.ContainerRegistry.Source","com.azure.resourcemanager.containerregistry.generated.models.Status":"Microsoft.ContainerRegistry.Status","com.azure.resourcemanager.containerregistry.generated.models.StatusDetailProperties":"Microsoft.ContainerRegistry.StatusDetailProperties","com.azure.resourcemanager.containerregistry.generated.models.SyncProperties":"Microsoft.ContainerRegistry.SyncProperties","com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties":"Microsoft.ContainerRegistry.SyncUpdateProperties","com.azure.resourcemanager.containerregistry.generated.models.Target":"Microsoft.ContainerRegistry.Target","com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties":"Microsoft.ContainerRegistry.TlsCertificateProperties","com.azure.resourcemanager.containerregistry.generated.models.TlsProperties":"Microsoft.ContainerRegistry.TlsProperties","com.azure.resourcemanager.containerregistry.generated.models.TlsStatus":"Microsoft.ContainerRegistry.TlsStatus","com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate":"Microsoft.ContainerRegistry.TokenCertificate","com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName":"Microsoft.ContainerRegistry.TokenCertificateName","com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties":"Microsoft.ContainerRegistry.TokenCredentialsProperties","com.azure.resourcemanager.containerregistry.generated.models.TokenPassword":"Microsoft.ContainerRegistry.TokenPassword","com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName":"Microsoft.ContainerRegistry.TokenPasswordName","com.azure.resourcemanager.containerregistry.generated.models.TokenProperties":"Microsoft.ContainerRegistry.TokenProperties","com.azure.resourcemanager.containerregistry.generated.models.TokenStatus":"Microsoft.ContainerRegistry.TokenStatus","com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters":"Microsoft.ContainerRegistry.TokenUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy":"Microsoft.ContainerRegistry.TrustPolicy","com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType":"Microsoft.ContainerRegistry.TrustPolicyType","com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties":"Microsoft.ContainerRegistry.UserIdentityProperties","com.azure.resourcemanager.containerregistry.generated.models.WebhookAction":"Microsoft.ContainerRegistry.WebhookAction","com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters":"Microsoft.ContainerRegistry.WebhookCreateParameters","com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties":"Microsoft.ContainerRegistry.WebhookProperties","com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus":"Microsoft.ContainerRegistry.WebhookStatus","com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters":"Microsoft.ContainerRegistry.WebhookUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy":"Microsoft.ContainerRegistry.ZoneRedundancy"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json new file mode 100644 index 000000000000..03b3e11e4a4e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json @@ -0,0 +1 @@ +[["com.azure.resourcemanager.containerregistry.generated.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.generated.implementation.WebhooksClientImpl$WebhooksService"]] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java new file mode 100644 index 000000000000..de278b166e0b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; + +/** + * Samples for CacheRules Create. + */ +public final class CacheRulesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleCreate.json + */ + /** + * Sample code: CacheRuleCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules() + .define("myCacheRule") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new CacheRuleProperties().withCredentialSetResourceId("fakeTokenPlaceholder") + .withSourceRepository("docker.io/library/hello-world") + .withTargetRepository("cached-docker-hub/hello-world")) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java new file mode 100644 index 000000000000..c3f3117179fa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CacheRules Delete. + */ +public final class CacheRulesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleDelete.json + */ + /** + * Sample code: CacheRuleDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules().delete("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java new file mode 100644 index 000000000000..4ad07878575f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CacheRules Get. + */ +public final class CacheRulesGetSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleGet.json + */ + /** + * Sample code: CacheRuleGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules() + .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java new file mode 100644 index 000000000000..aa80d4c5f14f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CacheRules List. + */ +public final class CacheRulesListSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleList.json + */ + /** + * Sample code: CacheRuleList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.cacheRules().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java new file mode 100644 index 000000000000..7eac0ddbb2eb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; + +/** + * Samples for CacheRules Update. + */ +public final class CacheRulesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json + */ + /** + * Sample code: CacheRuleUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + cacheRuleUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + CacheRule resource = manager.cacheRules() + .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withCredentialSetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2") + .apply(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java new file mode 100644 index 000000000000..ce5953c622d7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ParentProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncProperties; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for ConnectedRegistries Create. + */ +public final class ConnectedRegistriesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json + */ + /** + * Sample code: ConnectedRegistryCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryCreate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .define("myConnectedRegistry") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new ConnectedRegistryProperties().withMode(ConnectedRegistryMode.READ_WRITE) + .withParent( + new ParentProperties().withSyncProperties(new SyncProperties().withTokenId("fakeTokenPlaceholder") + .withSchedule("0 9 * * *") + .withSyncWindow(Duration.parse("PT3H")) + .withMessageTtl(Duration.parse("P2D")))) + .withClientTokenIds(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token")) + .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) + .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *"))) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java new file mode 100644 index 000000000000..498a336e15c5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ConnectedRegistries Deactivate. + */ +public final class ConnectedRegistriesDeactivateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json + */ + /** + * Sample code: ConnectedRegistryDeactivate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryDeactivate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .deactivate("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java new file mode 100644 index 000000000000..2e256d4ec28f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ConnectedRegistries Delete. + */ +public final class ConnectedRegistriesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json + */ + /** + * Sample code: ConnectedRegistryDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryDelete( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .delete("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java new file mode 100644 index 000000000000..11019ab0146f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ConnectedRegistries Get. + */ +public final class ConnectedRegistriesGetSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json + */ + /** + * Sample code: ConnectedRegistryGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + connectedRegistryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries() + .getWithResponse("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java new file mode 100644 index 000000000000..a66a7873ff85 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ConnectedRegistries List. + */ +public final class ConnectedRegistriesListSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json + */ + /** + * Sample code: ConnectedRegistryList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + connectedRegistryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.connectedRegistries().list("myResourceGroup", "myRegistry", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java new file mode 100644 index 000000000000..f87c6b260db5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; +import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; +import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for ConnectedRegistries Update. + */ +public final class ConnectedRegistriesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json + */ + /** + * Sample code: ConnectedRegistryUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void connectedRegistryUpdate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + ConnectedRegistry resource = manager.connectedRegistries() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSyncProperties(new SyncUpdateProperties().withSchedule("0 0 */10 * *") + .withSyncWindow(Duration.parse("P2D")) + .withMessageTtl(Duration.parse("P30D"))) + .withLogging( + new LoggingProperties().withLogLevel(LogLevel.DEBUG).withAuditLogStatus(AuditLogStatus.ENABLED)) + .withClientTokenIds(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token")) + .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) + .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *")) + .apply(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java new file mode 100644 index 000000000000..a5b2720d0841 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; +import java.util.Arrays; + +/** + * Samples for CredentialSets Create. + */ +public final class CredentialSetsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetCreate.json + */ + /** + * Sample code: CredentialSetCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .define("myCredentialSet") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new CredentialSetProperties().withLoginServer("docker.io") + .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder")))) + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java new file mode 100644 index 000000000000..dcf22fd0aea6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CredentialSets Delete. + */ +public final class CredentialSetsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetDelete.json + */ + /** + * Sample code: CredentialSetDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .delete("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java new file mode 100644 index 000000000000..90327dac1270 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CredentialSets Get. + */ +public final class CredentialSetsGetSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetGet.json + */ + /** + * Sample code: CredentialSetGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets() + .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java new file mode 100644 index 000000000000..90656f2a1d36 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for CredentialSets List. + */ +public final class CredentialSetsListSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetList.json + */ + /** + * Sample code: CredentialSetList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.credentialSets().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java new file mode 100644 index 000000000000..096907625f68 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; +import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; +import java.util.Arrays; + +/** + * Samples for CredentialSets Update. + */ +public final class CredentialSetsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json + */ + /** + * Sample code: CredentialSetUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + credentialSetUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + CredentialSet resource = manager.credentialSets() + .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder"))) + .apply(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java new file mode 100644 index 000000000000..dfdbbbb7bf29 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2025-11-01/OperationList.json + */ + /** + * Sample code: OperationList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + operationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6bbdf175712d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json + */ + /** + * Sample code: PrivateEndpointConnectionCreateOrUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionCreateOrUpdate( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .define("myConnection") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("Auto-Approved"))) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..b0c67110c18f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json + */ + /** + * Sample code: PrivateEndpointConnectionDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionDelete( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .delete("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..3d3b19c5465a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json + */ + /** + * Sample code: PrivateEndpointConnectionGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionGet( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..484a4b188bb6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json + */ + /** + * Sample code: PrivateEndpointConnectionList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void privateEndpointConnectionList( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.privateEndpointConnections().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java new file mode 100644 index 000000000000..7fae73cd7178 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; + +/** + * Samples for Registries CheckNameAvailability. + */ +public final class RegistriesCheckNameAvailabilitySamples { + /* + * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json + */ + /** + * Sample code: RegistryCheckNameAvailable. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCheckNameAvailable( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json + */ + /** + * Sample code: RegistryCheckNameNotAvailable. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCheckNameNotAvailable( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java new file mode 100644 index 000000000000..7f293b5e353f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import com.azure.resourcemanager.containerregistry.generated.models.SkuName; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Registries Create. + */ +public final class RegistriesCreateSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json + */ + /** + * Sample code: RegistryCreateAbac. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryCreateAbac(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties( + new RegistryProperties().withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS)) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json + */ + /** + * Sample code: RegistryCreateZoneRedundant. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryCreateZoneRedundant( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new RegistryProperties().withZoneRedundancy(ZoneRedundancy.ENABLED)) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/RegistryCreate.json + */ + /** + * Sample code: RegistryCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .define("myRegistry") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName(SkuName.STANDARD)) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new RegistryProperties().withAdminUserEnabled(true)) + .create(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java new file mode 100644 index 000000000000..caca2a1916c9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries Delete. + */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryDelete.json + */ + /** + * Sample code: RegistryDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().delete("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java new file mode 100644 index 000000000000..f459b555511f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; +import java.time.OffsetDateTime; + +/** + * Samples for Registries GenerateCredentials. + */ +public final class RegistriesGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json + */ + /** + * Sample code: RegistryGenerateCredentials. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryGenerateCredentials( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .generateCredentials("myResourceGroup", "myRegistry", + new GenerateCredentialsParameters().withTokenId("fakeTokenPlaceholder") + .withExpiry(OffsetDateTime.parse("2020-12-31T15:59:59.0707808Z")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..fcafb15b915c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries GetByResourceGroup. + */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGet.json + */ + /** + * Sample code: RegistryGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java new file mode 100644 index 000000000000..1c00e21c4abe --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries GetPrivateLinkResource. + */ +public final class RegistriesGetPrivateLinkResourceSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json + */ + /** + * Sample code: RegistryGetPrivateLinkResource. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryGetPrivateLinkResource( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .getPrivateLinkResourceWithResponse("myResourceGroup", "myRegistry", "registry", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java new file mode 100644 index 000000000000..7772a637faf6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; +import com.azure.resourcemanager.containerregistry.generated.models.ImportMode; +import com.azure.resourcemanager.containerregistry.generated.models.ImportSource; +import java.util.Arrays; + +/** + * Samples for Registries ImportImage. + */ +public final class RegistriesImportImageSamples { + /* + * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json + */ + /** + * Sample code: ImportImageFromPublicRegistry. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void importImageFromPublicRegistry( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters() + .withSource(new ImportSource().withRegistryUri("registry.hub.docker.com") + .withSourceImage("library/hello-world")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/ImportImageByTag.json + */ + /** + * Sample code: ImportImageByTag. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + importImageByTag(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters().withSource(new ImportSource().withResourceId( + "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") + .withSourceImage("sourceRepository:sourceTag")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json + */ + /** + * Sample code: ImportImageByManifestDigest. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void importImageByManifestDigest( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .importImage("myResourceGroup", "myRegistry", + new ImportImageParameters().withSource(new ImportSource().withResourceId( + "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") + .withSourceImage( + "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000")) + .withTargetTags(Arrays.asList("targetRepository:targetTag")) + .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) + .withMode(ImportMode.FORCE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java new file mode 100644 index 000000000000..8c907f1aa279 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries ListByResourceGroup. + */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json + */ + /** + * Sample code: RegistryListByResourceGroup. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListByResourceGroup( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java new file mode 100644 index 000000000000..fe2dbfca4158 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries ListCredentials. + */ +public final class RegistriesListCredentialsSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListCredentials.json + */ + /** + * Sample code: RegistryListCredentials. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListCredentials( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .listCredentialsWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java new file mode 100644 index 000000000000..489bbb6cff04 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries ListPrivateLinkResources. + */ +public final class RegistriesListPrivateLinkResourcesSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json + */ + /** + * Sample code: RegistryListPrivateLinkResources. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryListPrivateLinkResources( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .listPrivateLinkResources("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java new file mode 100644 index 000000000000..50a6b3d3def4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries List. + */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryList.json + */ + /** + * Sample code: RegistryList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java new file mode 100644 index 000000000000..e8945ff9f4ca --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Registries ListUsages. + */ +public final class RegistriesListUsagesSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryListUsages.json + */ + /** + * Sample code: RegistryListUsages. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryListUsages(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries().listUsagesWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java new file mode 100644 index 000000000000..c5f4efea19a5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; + +/** + * Samples for Registries RegenerateCredential. + */ +public final class RegistriesRegenerateCredentialSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json + */ + /** + * Sample code: RegistryRegenerateCredential. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void registryRegenerateCredential( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.registries() + .regenerateCredentialWithResponse("myResourceGroup", "myRegistry", + new RegenerateCredentialParameters().withName(PasswordName.PASSWORD), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java new file mode 100644 index 000000000000..24422bfc6809 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.Registry; +import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import com.azure.resourcemanager.containerregistry.generated.models.SkuName; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Registries Update. + */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/RegistryUpdate.json + */ + /** + * Sample code: RegistryUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + registryUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Registry resource = manager.registries() + .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withSku(new Sku().withName(SkuName.STANDARD)) + .withAdminUserEnabled(true) + .withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS) + .apply(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java new file mode 100644 index 000000000000..1eadb0b28b49 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Replications Create. + */ +public final class ReplicationsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationCreate.json + */ + /** + * Sample code: ReplicationCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .define("myReplication") + .withRegion("eastus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json + */ + /** + * Sample code: ReplicationCreateZoneRedundant. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void replicationCreateZoneRedundant( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .define("myReplication") + .withRegion("eastus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties( + new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) + .create(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java new file mode 100644 index 000000000000..7734bb501890 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Replications Delete. + */ +public final class ReplicationsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationDelete.json + */ + /** + * Sample code: ReplicationDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .delete("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java new file mode 100644 index 000000000000..389b8be593ae --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Replications Get. + */ +public final class ReplicationsGetSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationGet.json + */ + /** + * Sample code: ReplicationGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications() + .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java new file mode 100644 index 000000000000..45b8ed0ff816 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Replications List. + */ +public final class ReplicationsListSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationList.json + */ + /** + * Sample code: ReplicationList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.replications().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java new file mode 100644 index 000000000000..ec2a6e85c2c8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Replications Update. + */ +public final class ReplicationsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ReplicationUpdate.json + */ + /** + * Sample code: ReplicationUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + replicationUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Replication resource = manager.replications() + .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java new file mode 100644 index 000000000000..84e880e3698d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.util.Arrays; + +/** + * Samples for ScopeMaps Create. + */ +public final class ScopeMapsCreateSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapCreate.json + */ + /** + * Sample code: ScopeMapCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps() + .define("myScopeMap") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new ScopeMapProperties().withDescription("Developer Scopes") + .withActions( + Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/delete"))) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java new file mode 100644 index 000000000000..01295295e845 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ScopeMaps Delete. + */ +public final class ScopeMapsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapDelete.json + */ + /** + * Sample code: ScopeMapDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps().delete("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java new file mode 100644 index 000000000000..470062b94920 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ScopeMaps Get. + */ +public final class ScopeMapsGetSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapGet.json + */ + /** + * Sample code: ScopeMapGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java new file mode 100644 index 000000000000..51e9550c7bfd --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for ScopeMaps List. + */ +public final class ScopeMapsListSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapList.json + */ + /** + * Sample code: ScopeMapList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.scopeMaps().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java new file mode 100644 index 000000000000..7ba162092ae5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import java.util.Arrays; + +/** + * Samples for ScopeMaps Update. + */ +public final class ScopeMapsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json + */ + /** + * Sample code: ScopeMapUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + scopeMapUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + ScopeMap resource = manager.scopeMaps() + .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDescription("Developer Scopes") + .withActions( + Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/contentRead")) + .apply(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java new file mode 100644 index 000000000000..7f0335309725 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; +import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; +import java.util.Arrays; + +/** + * Samples for Tokens Create. + */ +public final class TokensCreateSamples { + /* + * x-ms-original-file: 2025-11-01/TokenCreate.json + */ + /** + * Sample code: TokenCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens() + .define("myToken") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withProperties(new TokenProperties().withScopeMapId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap") + .withCredentials(new TokenCredentialsProperties() + .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) + .withEncodedPemCertificate("fakeTokenPlaceholder")))) + .withStatus(TokenStatus.DISABLED)) + .create(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java new file mode 100644 index 000000000000..f8e37ade9447 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Tokens Delete. + */ +public final class TokensDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/TokenDelete.json + */ + /** + * Sample code: TokenDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().delete("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java new file mode 100644 index 000000000000..ad680a84d633 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Tokens Get. + */ +public final class TokensGetSamples { + /* + * x-ms-original-file: 2025-11-01/TokenGet.json + */ + /** + * Sample code: TokenGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java new file mode 100644 index 000000000000..670b4742ae1d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Tokens List. + */ +public final class TokensListSamples { + /* + * x-ms-original-file: 2025-11-01/TokenList.json + */ + /** + * Sample code: TokenList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.tokens().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java new file mode 100644 index 000000000000..db52d44a2a3e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.Token; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; +import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; +import java.util.Arrays; + +/** + * Samples for Tokens Update. + */ +public final class TokensUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/TokenUpdate.json + */ + /** + * Sample code: TokenUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + tokenUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Token resource = manager.tokens() + .getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withScopeMapId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap") + .withCredentials(new TokenCredentialsProperties() + .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) + .withEncodedPemCertificate("fakeTokenPlaceholder")))) + .apply(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java new file mode 100644 index 000000000000..3b889068f64c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Webhooks Create. + */ +public final class WebhooksCreateSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookCreate.json + */ + /** + * Sample code: WebhookCreate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .define("myWebhook") + .withRegion("westus") + .withExistingRegistry("myResourceGroup", "myRegistry") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withServiceUri("http://myservice.com") + .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) + .withStatus(WebhookStatus.ENABLED) + .withScope("myRepository") + .withActions(Arrays.asList(WebhookAction.PUSH)) + .create(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java new file mode 100644 index 000000000000..6a1c8f4dae2a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks Delete. + */ +public final class WebhooksDeleteSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookDelete.json + */ + /** + * Sample code: WebhookDelete. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().delete("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java new file mode 100644 index 000000000000..a652f9fa365d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks GetCallbackConfig. + */ +public final class WebhooksGetCallbackConfigSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json + */ + /** + * Sample code: WebhookGetCallbackConfig. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void webhookGetCallbackConfig( + com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .getCallbackConfigWithResponse("myResourceGroup", "myRegistry", "myWebhook", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java new file mode 100644 index 000000000000..8ce40f363b73 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks Get. + */ +public final class WebhooksGetSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookGet.json + */ + /** + * Sample code: WebhookGet. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java new file mode 100644 index 000000000000..2618e5d3296b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks ListEvents. + */ +public final class WebhooksListEventsSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookListEvents.json + */ + /** + * Sample code: WebhookListEvents. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookListEvents(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().listEvents("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java new file mode 100644 index 000000000000..017d34aa6546 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks List. + */ +public final class WebhooksListSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookList.json + */ + /** + * Sample code: WebhookList. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java new file mode 100644 index 000000000000..0cea600e0963 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +/** + * Samples for Webhooks Ping. + */ +public final class WebhooksPingSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookPing.json + */ + /** + * Sample code: WebhookPing. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookPing(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + manager.webhooks() + .pingWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java new file mode 100644 index 000000000000..fcbc62eb22df --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Webhooks Update. + */ +public final class WebhooksUpdateSamples { + /* + * x-ms-original-file: 2025-11-01/WebhookUpdate.json + */ + /** + * Sample code: WebhookUpdate. + * + * @param manager Entry point to ContainerRegistryManager. + */ + public static void + webhookUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { + Webhook resource = manager.webhooks() + .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withServiceUri("http://myservice.com") + .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) + .withStatus(WebhookStatus.ENABLED) + .withScope("myRepository") + .withActions(Arrays.asList(WebhookAction.PUSH)) + .apply(); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java new file mode 100644 index 000000000000..b80ebd8455e1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties; + +public final class ActivationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivationProperties model + = BinaryData.fromString("{\"status\":\"Active\"}").toObject(ActivationProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java new file mode 100644 index 000000000000..dfd497212709 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Actor; +import org.junit.jupiter.api.Assertions; + +public final class ActorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Actor model = BinaryData.fromString("{\"name\":\"minrfdw\"}").toObject(Actor.class); + Assertions.assertEquals("minrfdw", model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java new file mode 100644 index 000000000000..8ac219255889 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class AzureADAuthenticationAsArmPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureADAuthenticationAsArmPolicy model + = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(AzureADAuthenticationAsArmPolicy.class); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureADAuthenticationAsArmPolicy model + = new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(AzureADAuthenticationAsArmPolicy.class); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java new file mode 100644 index 000000000000..f828e870d92a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; +import org.junit.jupiter.api.Assertions; + +public final class CallbackConfigInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CallbackConfigInner model = BinaryData.fromString( + "{\"serviceUri\":\"wem\",\"customHeaders\":{\"sfgytguslfead\":\"ncsdtclusiyp\",\"isxgfp\":\"ygqukyhejh\",\"vk\":\"lolp\"}}") + .toObject(CallbackConfigInner.class); + Assertions.assertEquals("wem", model.serviceUri()); + Assertions.assertEquals("ncsdtclusiyp", model.customHeaders().get("sfgytguslfead")); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java new file mode 100644 index 000000000000..c504226954ac --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ConnectedRegistriesDeactivateMockTests { + @Test + public void testDeactivate() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.connectedRegistries() + .deactivate("fqntcyp", "xjvfoimwksl", "rcizjxvyd", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java new file mode 100644 index 000000000000..c358186618a6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ConnectedRegistriesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.connectedRegistries().delete("xacpqjli", "hyus", "skasdvlmfwdgzxu", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java new file mode 100644 index 000000000000..c8a2ef7f4c7f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.EventContent; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EventContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventContent model = BinaryData.fromString( + "{\"id\":\"sgsahmkycgr\",\"timestamp\":\"2021-04-05T08:15:46Z\",\"action\":\"uetae\",\"target\":{\"mediaType\":\"u\",\"size\":7946094316421332336,\"digest\":\"s\",\"length\":122203340642919775,\"repository\":\"ab\",\"url\":\"oefki\",\"tag\":\"vtpuqujmqlgk\",\"name\":\"tndoaongbjc\",\"version\":\"ujitcjedftww\"},\"request\":{\"id\":\"kojvd\",\"addr\":\"zfoqouicybxar\",\"host\":\"szufoxciqopidoa\",\"method\":\"iodhkhazxkhnz\",\"useragent\":\"nlwntoe\"},\"actor\":{\"name\":\"dwbwhkszzcmrvexz\"},\"source\":{\"addr\":\"t\",\"instanceID\":\"sfraoyzko\"}}") + .toObject(EventContent.class); + Assertions.assertEquals("sgsahmkycgr", model.id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.timestamp()); + Assertions.assertEquals("uetae", model.action()); + Assertions.assertEquals("u", model.target().mediaType()); + Assertions.assertEquals(7946094316421332336L, model.target().size()); + Assertions.assertEquals("s", model.target().digest()); + Assertions.assertEquals(122203340642919775L, model.target().length()); + Assertions.assertEquals("ab", model.target().repository()); + Assertions.assertEquals("oefki", model.target().url()); + Assertions.assertEquals("vtpuqujmqlgk", model.target().tag()); + Assertions.assertEquals("tndoaongbjc", model.target().name()); + Assertions.assertEquals("ujitcjedftww", model.target().version()); + Assertions.assertEquals("kojvd", model.request().id()); + Assertions.assertEquals("zfoqouicybxar", model.request().addr()); + Assertions.assertEquals("szufoxciqopidoa", model.request().host()); + Assertions.assertEquals("iodhkhazxkhnz", model.request().method()); + Assertions.assertEquals("nlwntoe", model.request().useragent()); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.actor().name()); + Assertions.assertEquals("t", model.source().addr()); + Assertions.assertEquals("sfraoyzko", model.source().instanceID()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java new file mode 100644 index 000000000000..e98416c10432 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; +import org.junit.jupiter.api.Assertions; + +public final class EventInfoInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventInfoInner model = BinaryData.fromString("{\"id\":\"osjswsr\"}").toObject(EventInfoInner.class); + Assertions.assertEquals("osjswsr", model.id()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java new file mode 100644 index 000000000000..dc59af77deac --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EventRequestMessageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventRequestMessage model = BinaryData.fromString( + "{\"content\":{\"id\":\"wnujhemmsbvdk\",\"timestamp\":\"2021-11-07T07:11:51Z\",\"action\":\"tjinf\",\"target\":{\"mediaType\":\"fltkacjv\",\"size\":6490344131392989957,\"digest\":\"foakgg\",\"length\":5309095811404897814,\"repository\":\"ao\",\"url\":\"ulpqblylsyxkqjn\",\"tag\":\"ervtiagxs\",\"name\":\"zuempsbzkf\",\"version\":\"eyvpnqicvinvkj\"},\"request\":{\"id\":\"xrbuukzclew\",\"addr\":\"mlwpazt\",\"host\":\"ofncckwyfzqwhxxb\",\"method\":\"qa\",\"useragent\":\"feqztppriol\"},\"actor\":{\"name\":\"jaltolmnc\"},\"source\":{\"addr\":\"bqwcsdbnwdcf\",\"instanceID\":\"cqdpfuv\"}},\"headers\":{\"anvx\":\"bjj\",\"xqtvcofu\":\"vtvudutncormr\"},\"method\":\"lvkgju\",\"requestUri\":\"dknnqvsazn\",\"version\":\"tor\"}") + .toObject(EventRequestMessage.class); + Assertions.assertEquals("wnujhemmsbvdk", model.content().id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T07:11:51Z"), model.content().timestamp()); + Assertions.assertEquals("tjinf", model.content().action()); + Assertions.assertEquals("fltkacjv", model.content().target().mediaType()); + Assertions.assertEquals(6490344131392989957L, model.content().target().size()); + Assertions.assertEquals("foakgg", model.content().target().digest()); + Assertions.assertEquals(5309095811404897814L, model.content().target().length()); + Assertions.assertEquals("ao", model.content().target().repository()); + Assertions.assertEquals("ulpqblylsyxkqjn", model.content().target().url()); + Assertions.assertEquals("ervtiagxs", model.content().target().tag()); + Assertions.assertEquals("zuempsbzkf", model.content().target().name()); + Assertions.assertEquals("eyvpnqicvinvkj", model.content().target().version()); + Assertions.assertEquals("xrbuukzclew", model.content().request().id()); + Assertions.assertEquals("mlwpazt", model.content().request().addr()); + Assertions.assertEquals("ofncckwyfzqwhxxb", model.content().request().host()); + Assertions.assertEquals("qa", model.content().request().method()); + Assertions.assertEquals("feqztppriol", model.content().request().useragent()); + Assertions.assertEquals("jaltolmnc", model.content().actor().name()); + Assertions.assertEquals("bqwcsdbnwdcf", model.content().source().addr()); + Assertions.assertEquals("cqdpfuv", model.content().source().instanceID()); + Assertions.assertEquals("bjj", model.headers().get("anvx")); + Assertions.assertEquals("lvkgju", model.method()); + Assertions.assertEquals("dknnqvsazn", model.requestUri()); + Assertions.assertEquals("tor", model.version()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java new file mode 100644 index 000000000000..0fc2a40893b7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class ExportPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportPolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(ExportPolicy.class); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportPolicy model = new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ExportPolicy.class); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java new file mode 100644 index 000000000000..0ec27d71ed3b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GarbageCollectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":true,\"schedule\":\"kfssxqukkf\"}") + .toObject(GarbageCollectionProperties.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("kfssxqukkf", model.schedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GarbageCollectionProperties model + = new GarbageCollectionProperties().withEnabled(true).withSchedule("kfssxqukkf"); + model = BinaryData.fromObject(model).toObject(GarbageCollectionProperties.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("kfssxqukkf", model.schedule()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java new file mode 100644 index 000000000000..d12aa2dd1b35 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Action; +import com.azure.resourcemanager.containerregistry.generated.models.IPRule; +import org.junit.jupiter.api.Assertions; + +public final class IPRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IPRule model = BinaryData.fromString("{\"action\":\"Allow\",\"value\":\"jyj\"}").toObject(IPRule.class); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("jyj", model.iPAddressOrRange()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IPRule model = new IPRule().withAction(Action.ALLOW).withIPAddressOrRange("jyj"); + model = BinaryData.fromObject(model).toObject(IPRule.class); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("jyj", model.iPAddressOrRange()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java new file mode 100644 index 000000000000..cf71fed5a622 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; +import com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class IdentityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentityProperties model = BinaryData.fromString( + "{\"principalId\":\"ewmdw\",\"tenantId\":\"eiachboosflnr\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wjdk\":{\"principalId\":\"eeh\",\"clientId\":\"vypyqrimzinpv\"},\"ifiyipjxsqwpgrj\":{\"principalId\":\"soodqxhcrmnoh\",\"clientId\":\"ckwhds\"}}}") + .toObject(IdentityProperties.class); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentityProperties model = new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("wjdk", new UserIdentityProperties(), "ifiyipjxsqwpgrj", new UserIdentityProperties())); + model = BinaryData.fromObject(model).toObject(IdentityProperties.class); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java new file mode 100644 index 000000000000..83d4dab1f539 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; +import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; +import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; +import org.junit.jupiter.api.Assertions; + +public final class LoggingPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoggingProperties model = BinaryData.fromString("{\"logLevel\":\"Error\",\"auditLogStatus\":\"Enabled\"}") + .toObject(LoggingProperties.class); + Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoggingProperties model + = new LoggingProperties().withLogLevel(LogLevel.ERROR).withAuditLogStatus(AuditLogStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(LoggingProperties.class); + Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java new file mode 100644 index 000000000000..1d8ad2ece593 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties; + +public final class LoginServerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoginServerProperties model = BinaryData.fromString( + "{\"host\":\"jancu\",\"tls\":{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"xbniwdjs\"}}}") + .toObject(LoginServerProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoginServerProperties model = new LoginServerProperties(); + model = BinaryData.fromObject(model).toObject(LoginServerProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java new file mode 100644 index 000000000000..6baba64fc52f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Action; +import com.azure.resourcemanager.containerregistry.generated.models.DefaultAction; +import com.azure.resourcemanager.containerregistry.generated.models.IPRule; +import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkRuleSetTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkRuleSet model = BinaryData + .fromString("{\"defaultAction\":\"Allow\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"fpsalgbqu\"}]}") + .toObject(NetworkRuleSet.class); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).iPAddressOrRange()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkRuleSet model = new NetworkRuleSet().withDefaultAction(DefaultAction.ALLOW) + .withIpRules(Arrays.asList(new IPRule().withAction(Action.ALLOW).withIPAddressOrRange("fpsalgbqu"))); + model = BinaryData.fromObject(model).toObject(NetworkRuleSet.class); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).iPAddressOrRange()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java new file mode 100644 index 000000000000..aca250a8f971 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; +import org.junit.jupiter.api.Assertions; + +public final class OperationDefinitionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDefinitionInner model = BinaryData.fromString( + "{\"origin\":\"smy\",\"name\":\"kdtmlxhekuk\",\"display\":{\"provider\":\"xukcdmpar\",\"resource\":\"y\",\"operation\":\"nzwuxzd\",\"description\":\"a\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hfpmrqobmtukknr\",\"displayName\":\"tihfx\",\"displayDescription\":\"jbpzvgnwzsymg\",\"unit\":\"uf\",\"aggregationType\":\"zk\",\"internalMetricName\":\"dbihanufhfcbj\"}],\"logSpecifications\":[{\"name\":\"ithxqhabifpi\",\"displayName\":\"wczbys\",\"blobDuration\":\"pqxu\"}]}},\"isDataAction\":false}") + .toObject(OperationDefinitionInner.class); + Assertions.assertEquals("smy", model.origin()); + Assertions.assertEquals("kdtmlxhekuk", model.name()); + Assertions.assertEquals("xukcdmpar", model.display().provider()); + Assertions.assertEquals("y", model.display().resource()); + Assertions.assertEquals("nzwuxzd", model.display().operation()); + Assertions.assertEquals("a", model.display().description()); + Assertions.assertFalse(model.isDataAction()); + Assertions.assertEquals("hfpmrqobmtukknr", model.serviceSpecification().metricSpecifications().get(0).name()); + Assertions.assertEquals("tihfx", model.serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("jbpzvgnwzsymg", + model.serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("uf", model.serviceSpecification().metricSpecifications().get(0).unit()); + Assertions.assertEquals("zk", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("dbihanufhfcbj", + model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("ithxqhabifpi", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("wczbys", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("pqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java new file mode 100644 index 000000000000..024e86957b1c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationDisplayDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplayDefinition model = BinaryData.fromString( + "{\"provider\":\"qniwbybrkxvdumj\",\"resource\":\"tfwvukxgaudc\",\"operation\":\"nhsjcnyej\",\"description\":\"ryhtnapczwlokjy\"}") + .toObject(OperationDisplayDefinition.class); + Assertions.assertEquals("qniwbybrkxvdumj", model.provider()); + Assertions.assertEquals("tfwvukxgaudc", model.resource()); + Assertions.assertEquals("nhsjcnyej", model.operation()); + Assertions.assertEquals("ryhtnapczwlokjy", model.description()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java new file mode 100644 index 000000000000..4768f4102bed --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"origin\":\"quvgjxpybczme\",\"name\":\"tzopbsphrupidgsy\",\"display\":{\"provider\":\"jhphoyc\",\"resource\":\"xaobhdxbmtqioqjz\",\"operation\":\"tbmufpo\",\"description\":\"oizh\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":true},{\"origin\":\"ijgkdm\",\"name\":\"azlobcufpdznrbt\",\"display\":{\"provider\":\"jnqglhqgnu\",\"resource\":\"oo\",\"operation\":\"wifsq\",\"description\":\"aagdfmg\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{}],\"logSpecifications\":[{},{}]}},\"isDataAction\":false},{\"origin\":\"wmrvktsizntocipa\",\"name\":\"ajpsquc\",\"display\":{\"provider\":\"yf\",\"resource\":\"fogknygjofjdde\",\"operation\":\"rd\",\"description\":\"pewnw\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":false}],\"nextLink\":\"sarhmofc\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("quvgjxpybczme", model.value().get(0).origin()); + Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).name()); + Assertions.assertEquals("jhphoyc", model.value().get(0).display().provider()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().resource()); + Assertions.assertEquals("tbmufpo", model.value().get(0).display().operation()); + Assertions.assertEquals("oizh", model.value().get(0).display().description()); + Assertions.assertTrue(model.value().get(0).isDataAction()); + Assertions.assertEquals("sarhmofc", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java new file mode 100644 index 000000000000..5e1228e874bb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationLogSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationLogSpecificationDefinition model = BinaryData + .fromString("{\"name\":\"vmgxsab\",\"displayName\":\"qduujitcjczdz\",\"blobDuration\":\"ndhkrw\"}") + .toObject(OperationLogSpecificationDefinition.class); + Assertions.assertEquals("vmgxsab", model.name()); + Assertions.assertEquals("qduujitcjczdz", model.displayName()); + Assertions.assertEquals("ndhkrw", model.blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java new file mode 100644 index 000000000000..89dbae3f7255 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationMetricSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationMetricSpecificationDefinition model = BinaryData.fromString( + "{\"name\":\"lxxwrljdouskc\",\"displayName\":\"kocrcjdkwtnhx\",\"displayDescription\":\"jbiksqrglssai\",\"unit\":\"p\",\"aggregationType\":\"nzl\",\"internalMetricName\":\"fmppe\"}") + .toObject(OperationMetricSpecificationDefinition.class); + Assertions.assertEquals("lxxwrljdouskc", model.name()); + Assertions.assertEquals("kocrcjdkwtnhx", model.displayName()); + Assertions.assertEquals("jbiksqrglssai", model.displayDescription()); + Assertions.assertEquals("p", model.unit()); + Assertions.assertEquals("nzl", model.aggregationType()); + Assertions.assertEquals("fmppe", model.internalMetricName()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java new file mode 100644 index 000000000000..6fc2f7709d79 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationPropertiesDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationPropertiesDefinition model = BinaryData.fromString( + "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ni\",\"displayName\":\"oxzjnchgejspod\",\"displayDescription\":\"ilzyd\",\"unit\":\"o\",\"aggregationType\":\"yahux\",\"internalMetricName\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"displayName\":\"wmfdatscmdvpjhul\",\"displayDescription\":\"uvm\",\"unit\":\"ozkrwfndiodjpslw\",\"aggregationType\":\"dpvwryoqpsoaccta\",\"internalMetricName\":\"kljla\"},{\"name\":\"cr\",\"displayName\":\"fdfdosygexpa\",\"displayDescription\":\"akhmsbzjhcrz\",\"unit\":\"dphlxaolt\",\"aggregationType\":\"trg\",\"internalMetricName\":\"bpf\"}],\"logSpecifications\":[{\"name\":\"n\",\"displayName\":\"v\",\"blobDuration\":\"jrwzox\"}]}}") + .toObject(OperationPropertiesDefinition.class); + Assertions.assertEquals("ni", model.serviceSpecification().metricSpecifications().get(0).name()); + Assertions.assertEquals("oxzjnchgejspod", + model.serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("ilzyd", + model.serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("o", model.serviceSpecification().metricSpecifications().get(0).unit()); + Assertions.assertEquals("yahux", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("pmqnja", + model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("n", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("jrwzox", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java new file mode 100644 index 000000000000..8416f6af9b60 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationServiceSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationServiceSpecificationDefinition model = BinaryData.fromString( + "{\"metricSpecifications\":[{\"name\":\"elluwfziton\",\"displayName\":\"qfpjk\",\"displayDescription\":\"xofpdvhpfxxypi\",\"unit\":\"nmayhuybb\",\"aggregationType\":\"odepoogin\",\"internalMetricName\":\"amiheognarxz\"},{\"name\":\"heotusiv\",\"displayName\":\"v\",\"displayDescription\":\"iqihn\",\"unit\":\"ngbwjz\",\"aggregationType\":\"fygxgispemvtzfk\",\"internalMetricName\":\"ubljofxqe\"}],\"logSpecifications\":[{\"name\":\"e\",\"displayName\":\"hqjbasvmsmj\",\"blobDuration\":\"lngsntnbybkzgcwr\"}]}") + .toObject(OperationServiceSpecificationDefinition.class); + Assertions.assertEquals("elluwfziton", model.metricSpecifications().get(0).name()); + Assertions.assertEquals("qfpjk", model.metricSpecifications().get(0).displayName()); + Assertions.assertEquals("xofpdvhpfxxypi", model.metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("nmayhuybb", model.metricSpecifications().get(0).unit()); + Assertions.assertEquals("odepoogin", model.metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("amiheognarxz", model.metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("e", model.logSpecifications().get(0).name()); + Assertions.assertEquals("hqjbasvmsmj", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("lngsntnbybkzgcwr", model.logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java new file mode 100644 index 000000000000..cfa3bb6ed6b2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class OperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"origin\":\"pqvujzraehtwdwrf\",\"name\":\"wib\",\"display\":{\"provider\":\"dl\",\"resource\":\"shfwpracstwity\",\"operation\":\"evxccedcp\",\"description\":\"dyodnwzxltj\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"iugcxnavvwxq\",\"displayName\":\"y\",\"displayDescription\":\"nyowxwlmdjrkvfg\",\"unit\":\"fvpdbo\",\"aggregationType\":\"cizsjqlhkrribdei\",\"internalMetricName\":\"ipqkghvxndzwm\"},{\"name\":\"efajpj\",\"displayName\":\"wkqnyhg\",\"displayDescription\":\"j\",\"unit\":\"ivfxzsjabibsyst\",\"aggregationType\":\"fsdjpvkvp\",\"internalMetricName\":\"xbkzbzkdvncj\"},{\"name\":\"udurgkakmokz\",\"displayName\":\"jk\",\"displayDescription\":\"fhmouwq\",\"unit\":\"zrfze\",\"aggregationType\":\"ebizikayuh\",\"internalMetricName\":\"bjbsybb\"}],\"logSpecifications\":[{\"name\":\"t\",\"displayName\":\"gmfpgvmp\",\"blobDuration\":\"as\"}]}},\"isDataAction\":false}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("pqvujzraehtwdwrf", response.iterator().next().origin()); + Assertions.assertEquals("wib", response.iterator().next().name()); + Assertions.assertEquals("dl", response.iterator().next().display().provider()); + Assertions.assertEquals("shfwpracstwity", response.iterator().next().display().resource()); + Assertions.assertEquals("evxccedcp", response.iterator().next().display().operation()); + Assertions.assertEquals("dyodnwzxltj", response.iterator().next().display().description()); + Assertions.assertFalse(response.iterator().next().isDataAction()); + Assertions.assertEquals("iugcxnavvwxq", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); + Assertions.assertEquals("y", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("nyowxwlmdjrkvfg", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("fvpdbo", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); + Assertions.assertEquals("cizsjqlhkrribdei", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("ipqkghvxndzwm", + response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("t", + response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("gmfpgvmp", + response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("as", + response.iterator().next().serviceSpecification().logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java new file mode 100644 index 000000000000..5ee94b4caba5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.Policies; +import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy; +import com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType; +import org.junit.jupiter.api.Assertions; + +public final class PoliciesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Policies model = BinaryData.fromString( + "{\"quarantinePolicy\":{\"status\":\"disabled\"},\"trustPolicy\":{\"type\":\"Notary\",\"status\":\"enabled\"},\"retentionPolicy\":{\"days\":1951867342,\"lastUpdatedTime\":\"2021-10-31T08:55:11Z\",\"status\":\"enabled\"},\"exportPolicy\":{\"status\":\"enabled\"},\"azureADAuthenticationAsArmPolicy\":{\"status\":\"disabled\"}}") + .toObject(Policies.class); + Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); + Assertions.assertEquals(1951867342, model.retentionPolicy().days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + model.azureADAuthenticationAsArmPolicy().status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Policies model = new Policies().withQuarantinePolicy(new QuarantinePolicy().withStatus(PolicyStatus.DISABLED)) + .withTrustPolicy(new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.ENABLED)) + .withRetentionPolicy(new RetentionPolicy().withDays(1951867342).withStatus(PolicyStatus.ENABLED)) + .withExportPolicy(new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED)) + .withAzureADAuthenticationAsArmPolicy( + new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(Policies.class); + Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); + Assertions.assertEquals(1951867342, model.retentionPolicy().days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + model.azureADAuthenticationAsArmPolicy().status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..21920d656029 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"ouqfprwz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"itnwuizgazxufi\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"},\"id\":\"i\",\"name\":\"rfidfvzwdz\",\"type\":\"htymw\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals("ouqfprwz", model.properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, + model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("itnwuizgazxufi", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + model.properties().privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner().withProperties( + new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("ouqfprwz")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("itnwuizgazxufi") + .withActionsRequired(ActionsRequired.NONE))); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals("ouqfprwz", model.properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, + model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("itnwuizgazxufi", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + model.properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java new file mode 100644 index 000000000000..717af87a4c12 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qnermclfplphoxu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bgyepsbj\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"xywpmueefjzwfqkq\",\"name\":\"jidsuyonobglaoc\",\"type\":\"xtccmg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ytlmoyrxvwfud\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"xhdzhlrqjbhckf\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"bkyvp\",\"name\":\"ca\",\"type\":\"uzbpzkafku\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"nwbmeh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jusrtslhspk\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Creating\"},\"id\":\"fm\",\"name\":\"ag\",\"type\":\"vt\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"qkrhahvljua\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"c\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"laexqp\",\"name\":\"fadmws\",\"type\":\"crgvxpvgom\"}],\"nextLink\":\"fmisg\"}") + .toObject(PrivateEndpointConnectionListResult.class); + Assertions.assertEquals("qnermclfplphoxu", model.value().get(0).properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.PENDING, + model.value().get(0).properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bgyepsbj", + model.value().get(0).properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("fmisg", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..1ae0d62fc017 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"privateEndpoint\":{\"id\":\"kfthwxmntei\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"km\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("kfthwxmntei")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) + .withDescription("km") + .withActionsRequired(ActionsRequired.NONE)); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..4e5b140597aa --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"abqgzslesjcbh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"iew\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uwrbehwagoh\",\"name\":\"uffkmrqemvvh\",\"type\":\"xtdr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateEndpointConnection response + = manager.privateEndpointConnections() + .define("qjfsmlmbtxhw") + .withExistingRegistry("dqkdlwwqfbu", "lkxt") + .withProperties(new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpoint().withId("rtawcoezb")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) + .withDescription("kh") + .withActionsRequired(ActionsRequired.NONE))) + .create(); + + Assertions.assertEquals("abqgzslesjcbh", response.properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.PENDING, + response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("iew", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + response.properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java new file mode 100644 index 000000000000..f5665a45af03 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.privateEndpointConnections() + .delete("zqljyxgtczh", "ydbsd", "hmkxmaehvbb", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java new file mode 100644 index 000000000000..bde857c39efc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ovqfzge\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"uljltduceamtmcz\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"cwwqiokn\",\"name\":\"sx\",\"type\":\"ojmsvpkjprvkwc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .getWithResponse("bydvkhbejdz", "xcv", "srhnjivo", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ovqfzge", response.properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, + response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("uljltduceamtmcz", + response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + response.properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java new file mode 100644 index 000000000000..5133b1e204ca --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"kl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"odpvruudlgzib\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Failed\"},\"id\":\"ktst\",\"name\":\"dxeclzedqbcvh\",\"type\":\"lhpl\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.privateEndpointConnections().list("uripltfnhtba", "kgxywr", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("kl", response.iterator().next().properties().privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, + response.iterator().next().properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("odpvruudlgzib", + response.iterator().next().properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..b5e3c14660ff --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"dcuf\"}").toObject(PrivateEndpoint.class); + Assertions.assertEquals("dcuf", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint().withId("dcuf"); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + Assertions.assertEquals("dcuf", model.id()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..fe7a577e4ff6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"okth\",\"requiredMembers\":[\"uaodsfcpk\",\"xodpuozmyzydagfu\"],\"requiredZoneNames\":[\"ezyiuokktwhrdxw\"]},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("ezyiuokktwhrdxw", model.properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java new file mode 100644 index 000000000000..7432d3b3799b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"pxjmflbvvnchr\",\"requiredMembers\":[\"iwwzjuqk\",\"rsa\",\"iwkuofos\"],\"requiredZoneNames\":[\"sauuimj\",\"vxieduugidyj\",\"rfbyaosvexcso\",\"pclhocohslk\"]},\"id\":\"leggzfbu\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"igrxwburvjxxjn\",\"requiredMembers\":[\"dptkoenkouk\",\"vudwtiukbldng\"],\"requiredZoneNames\":[\"cipazyxoegukgjnp\",\"ucgygevqz\",\"typmrbpizcdrqjsd\"]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"},{\"properties\":{\"groupId\":\"eyeam\",\"requiredMembers\":[\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"requiredZoneNames\":[\"uttmrywnuzoqft\"]},\"id\":\"qzrnkcqvyxlwhz\",\"name\":\"sicohoqqnwvlry\",\"type\":\"vwhheunmmqhgyx\"},{\"properties\":{\"groupId\":\"noc\",\"requiredMembers\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"],\"requiredZoneNames\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]},\"id\":\"ihkaetcktvfc\",\"name\":\"vf\",\"type\":\"nkymuctqhjfbebrj\"}],\"nextLink\":\"erfuwuttt\"}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("sauuimj", model.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("erfuwuttt", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..b620185efe85 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"tki\",\"requiredMembers\":[\"hqyudxorrqnbpoc\",\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"requiredZoneNames\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("exxbczwtr", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..7848c31a5ca9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model = BinaryData + .fromString("{\"status\":\"Approved\",\"description\":\"pymzidnsezcxtbzs\",\"actionsRequired\":\"None\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); + Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("pymzidnsezcxtbzs") + .withActionsRequired(ActionsRequired.NONE); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); + Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java new file mode 100644 index 000000000000..ff82a7839665 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy; +import org.junit.jupiter.api.Assertions; + +public final class QuarantinePolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuarantinePolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(QuarantinePolicy.class); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuarantinePolicy model = new QuarantinePolicy().withStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(QuarantinePolicy.class); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java new file mode 100644 index 000000000000..4e87697f2b84 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; +import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; +import org.junit.jupiter.api.Assertions; + +public final class RegenerateCredentialParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegenerateCredentialParameters model + = BinaryData.fromString("{\"name\":\"password2\"}").toObject(RegenerateCredentialParameters.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegenerateCredentialParameters model = new RegenerateCredentialParameters().withName(PasswordName.PASSWORD2); + model = BinaryData.fromObject(model).toObject(RegenerateCredentialParameters.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java new file mode 100644 index 000000000000..e9ba848c3262 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RegistriesCheckNameAvailabilityWithResponseMockTests { + @Test + public void testCheckNameAvailabilityWithResponse() throws Exception { + String responseStr = "{\"nameAvailable\":true,\"reason\":\"umh\",\"message\":\"lik\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RegistryNameStatus response = manager.registries() + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("krrjrea") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertTrue(response.nameAvailable()); + Assertions.assertEquals("umh", response.reason()); + Assertions.assertEquals("lik", response.message()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java new file mode 100644 index 000000000000..dcb7e46e02b6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RegistriesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.registries().delete("rqmq", "ldvriiiojnalghfk", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java new file mode 100644 index 000000000000..4e70923e20ac --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RegistriesGetPrivateLinkResourceWithResponseMockTests { + @Test + public void testGetPrivateLinkResourceWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"groupId\":\"znoigbrn\",\"requiredMembers\":[\"wkpnbsaz\"],\"requiredZoneNames\":[\"oqkag\",\"hsxttaugzxnf\",\"azpxdtnkdmkqjjl\"]},\"id\":\"envrkpyouaibrebq\",\"name\":\"aysjkixqtnqttez\",\"type\":\"wfff\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateLinkResource response = manager.registries() + .getPrivateLinkResourceWithResponse("xwslolbqpv", "zlmvfelfktgp", "crpw", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("oqkag", response.properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java new file mode 100644 index 000000000000..1f2b9af7497b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RegistriesListPrivateLinkResourcesMockTests { + @Test + public void testListPrivateLinkResources() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"groupId\":\"y\",\"requiredMembers\":[\"ygupkv\"],\"requiredZoneNames\":[\"dscwxqupevzhf\",\"totxhojujb\",\"pelmcuvhixbjxyf\"]},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.registries() + .listPrivateLinkResources("akpjpqqmtedlt", "mjihyeozphv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dscwxqupevzhf", response.iterator().next().properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java new file mode 100644 index 000000000000..368e64204945 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RegistriesListUsagesWithResponseMockTests { + @Test + public void testListUsagesWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"jioolvrwxk\",\"limit\":4652937384056066741,\"currentValue\":8177412740646436635,\"unit\":\"Bytes\"},{\"name\":\"ygvjayvblmh\",\"limit\":6263102268432414718,\"currentValue\":7397419477028168638,\"unit\":\"Count\"},{\"name\":\"hgsopbyrqufegx\",\"limit\":1956325765685570112,\"currentValue\":5985598462437896082,\"unit\":\"Count\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RegistryUsageListResult response = manager.registries() + .listUsagesWithResponse("qaatjinrv", "oupmfii", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("jioolvrwxk", response.value().get(0).name()); + Assertions.assertEquals(4652937384056066741L, response.value().get(0).limit()); + Assertions.assertEquals(8177412740646436635L, response.value().get(0).currentValue()); + Assertions.assertEquals(RegistryUsageUnit.BYTES, response.value().get(0).unit()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java new file mode 100644 index 000000000000..8ef61ecf5ca8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; +import org.junit.jupiter.api.Assertions; + +public final class RegistryNameCheckRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryNameCheckRequest model + = BinaryData.fromString("{\"name\":\"mdajv\",\"type\":\"Microsoft.ContainerRegistry/registries\"}") + .toObject(RegistryNameCheckRequest.class); + Assertions.assertEquals("mdajv", model.name()); + Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES); + model = BinaryData.fromObject(model).toObject(RegistryNameCheckRequest.class); + Assertions.assertEquals("mdajv", model.name()); + Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java new file mode 100644 index 000000000000..bb47e240330f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; +import org.junit.jupiter.api.Assertions; + +public final class RegistryNameStatusInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryNameStatusInner model + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"nqecanoaeup\",\"message\":\"yhltrpmopjmcm\"}") + .toObject(RegistryNameStatusInner.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals("nqecanoaeup", model.reason()); + Assertions.assertEquals("yhltrpmopjmcm", model.message()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java new file mode 100644 index 000000000000..656aeffbb51c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; +import org.junit.jupiter.api.Assertions; + +public final class RegistryPasswordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryPassword model = BinaryData.fromString("{\"name\":\"password2\",\"value\":\"bqvudwxdndn\"}") + .toObject(RegistryPassword.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + Assertions.assertEquals("bqvudwxdndn", model.value()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java new file mode 100644 index 000000000000..a120f4af01f0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; +import org.junit.jupiter.api.Assertions; + +public final class RegistryUsageListResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryUsageListResultInner model = BinaryData.fromString( + "{\"value\":[{\"name\":\"bonqvpkvlrxnjeas\",\"limit\":2687249492266688034,\"currentValue\":8008413633793129277,\"unit\":\"Bytes\"},{\"name\":\"eyy\",\"limit\":1523460255580500378,\"currentValue\":1246859219124083387,\"unit\":\"Bytes\"},{\"name\":\"rhpdjpjumas\",\"limit\":1164635978047948118,\"currentValue\":4118233747929526801,\"unit\":\"Count\"}]}") + .toObject(RegistryUsageListResultInner.class); + Assertions.assertEquals("bonqvpkvlrxnjeas", model.value().get(0).name()); + Assertions.assertEquals(2687249492266688034L, model.value().get(0).limit()); + Assertions.assertEquals(8008413633793129277L, model.value().get(0).currentValue()); + Assertions.assertEquals(RegistryUsageUnit.BYTES, model.value().get(0).unit()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java new file mode 100644 index 000000000000..e4f34884f393 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; +import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; +import org.junit.jupiter.api.Assertions; + +public final class RegistryUsageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryUsage model = BinaryData.fromString( + "{\"name\":\"alhbx\",\"limit\":65515238204620048,\"currentValue\":2136882508954141287,\"unit\":\"Bytes\"}") + .toObject(RegistryUsage.class); + Assertions.assertEquals("alhbx", model.name()); + Assertions.assertEquals(65515238204620048L, model.limit()); + Assertions.assertEquals(2136882508954141287L, model.currentValue()); + Assertions.assertEquals(RegistryUsageUnit.BYTES, model.unit()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java new file mode 100644 index 000000000000..d7ca6913025c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"ldawkzbaliourqha\",\"message\":\"uhashsfwx\",\"timestamp\":\"2021-10-19T13:09:56Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"gicjooxdjeb\",\"tags\":{\"ecivyh\":\"cwwfvovbvme\"},\"id\":\"ce\",\"name\":\"ojgjrwjueiotwmc\",\"type\":\"ytdxwit\"}") + .toObject(ReplicationInner.class); + Assertions.assertEquals("gicjooxdjeb", model.location()); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); + Assertions.assertFalse(model.properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.properties().zoneRedundancy()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationInner model = new ReplicationInner().withLocation("gicjooxdjeb") + .withTags(mapOf("ecivyh", "cwwfvovbvme")) + .withProperties(new ReplicationProperties().withRegionEndpointEnabled(false) + .withZoneRedundancy(ZoneRedundancy.DISABLED)); + model = BinaryData.fromObject(model).toObject(ReplicationInner.class); + Assertions.assertEquals("gicjooxdjeb", model.location()); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); + Assertions.assertFalse(model.properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.properties().zoneRedundancy()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java new file mode 100644 index 000000000000..a3fe15e1c555 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":{\"displayStatus\":\"przqlveu\",\"message\":\"upjm\",\"timestamp\":\"2021-08-12T08:43:21Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"sw\",\"tags\":{\"blcg\":\"jriplrbpbewtghf\",\"nmxiebwwaloayqc\":\"xzvlvqhjkbegib\"},\"id\":\"wrtz\",\"name\":\"uzgwyzmhtx\",\"type\":\"ngmtsavjcb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":{\"displayStatus\":\"rknftguvriuhprwm\",\"message\":\"vxqtayriwwroyqbe\",\"timestamp\":\"2021-06-25T11:51:15Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"cnojvknmefqsg\",\"tags\":{\"j\":\"hapjyzhpvgqz\"},\"id\":\"vxdjzlmwlxkvugf\",\"name\":\"zovawjvz\",\"type\":\"nluthnnp\"}],\"nextLink\":\"xipeilpjzuaejx\"}") + .toObject(ReplicationListResult.class); + Assertions.assertEquals("sw", model.value().get(0).location()); + Assertions.assertEquals("jriplrbpbewtghf", model.value().get(0).tags().get("blcg")); + Assertions.assertFalse(model.value().get(0).properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.value().get(0).properties().zoneRedundancy()); + Assertions.assertEquals("xipeilpjzuaejx", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java new file mode 100644 index 000000000000..4c3094fe3e2f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"wgqwgxhn\",\"message\":\"kxfbkpycgklwndn\",\"timestamp\":\"2021-06-18T07:43:59Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"}") + .toObject(ReplicationProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationProperties model + = new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED); + model = BinaryData.fromObject(model).toObject(ReplicationProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java new file mode 100644 index 000000000000..f4d375ff155a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationUpdateParametersPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationUpdateParametersProperties model = BinaryData.fromString("{\"regionEndpointEnabled\":true}") + .toObject(ReplicationUpdateParametersProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationUpdateParametersProperties model + = new ReplicationUpdateParametersProperties().withRegionEndpointEnabled(true); + model = BinaryData.fromObject(model).toObject(ReplicationUpdateParametersProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java new file mode 100644 index 000000000000..cff42bc335b4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"zbtd\":\"l\"},\"properties\":{\"regionEndpointEnabled\":false}}") + .toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("l", model.tags().get("zbtd")); + Assertions.assertFalse(model.regionEndpointEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationUpdateParameters model + = new ReplicationUpdateParameters().withTags(mapOf("zbtd", "l")).withRegionEndpointEnabled(false); + model = BinaryData.fromObject(model).toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("l", model.tags().get("zbtd")); + Assertions.assertFalse(model.regionEndpointEnabled()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java new file mode 100644 index 000000000000..fc048224dde3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ReplicationsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"juisavokqdzf\",\"message\":\"zivj\",\"timestamp\":\"2021-07-08T09:37:13Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"jlkatnwxy\",\"tags\":{\"qqfkuv\":\"id\",\"rxkpmloazuruoc\":\"cxkdmligovi\",\"bfhjxakvvjgsl\":\"goorbteo\",\"il\":\"r\"},\"id\":\"yw\",\"name\":\"t\",\"type\":\"gkxnyedabg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Replication response = manager.replications() + .define("pi") + .withRegion("kfm") + .withExistingRegistry("pthjoxo", "smsks") + .withTags(mapOf("wzf", "g")) + .withProperties( + new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) + .create(); + + Assertions.assertEquals("jlkatnwxy", response.location()); + Assertions.assertEquals("id", response.tags().get("qqfkuv")); + Assertions.assertFalse(response.properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, response.properties().zoneRedundancy()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java new file mode 100644 index 000000000000..09e6c8da7db4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ReplicationsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.replications() + .delete("alywjhhgdn", "xmsivfomiloxggdu", "iqndieuzaofj", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java new file mode 100644 index 000000000000..620f21d2fc0c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ReplicationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"iuxxpshneekulfg\",\"message\":\"qubkw\",\"timestamp\":\"2021-05-19T05:23:07Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"tujbazpju\",\"tags\":{\"lvxwmyg\":\"inyflnorwmduvwp\",\"hiszepnnbjcrxgib\":\"xpgpq\",\"kwbqplhlvnuu\":\"daxconfozauorsuk\"},\"id\":\"pzlrphw\",\"name\":\"soldweyuqdunv\",\"type\":\"nnrwrbiork\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Replication response = manager.replications() + .getWithResponse("futacoebjvewzc", "znmwcp", "guaadraufactkahz", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("tujbazpju", response.location()); + Assertions.assertEquals("inyflnorwmduvwp", response.tags().get("lvxwmyg")); + Assertions.assertFalse(response.properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, response.properties().zoneRedundancy()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java new file mode 100644 index 000000000000..26486bcdb007 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Replication; +import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ReplicationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"oqonma\",\"message\":\"ekni\",\"timestamp\":\"2021-10-27T20:39:18Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"pevf\",\"tags\":{\"bywdxsmicc\":\"lrri\"},\"id\":\"rwfscjfnynszquj\",\"name\":\"zdvoqytibyowbb\",\"type\":\"gyavu\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.replications().list("hvcyyysfg", "otcubi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("pevf", response.iterator().next().location()); + Assertions.assertEquals("lrri", response.iterator().next().tags().get("bywdxsmicc")); + Assertions.assertFalse(response.iterator().next().properties().regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, response.iterator().next().properties().zoneRedundancy()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java new file mode 100644 index 000000000000..6544b084161b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Request; +import org.junit.jupiter.api.Assertions; + +public final class RequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Request model = BinaryData.fromString( + "{\"id\":\"vbbejdcng\",\"addr\":\"m\",\"host\":\"kufgmj\",\"method\":\"wr\",\"useragent\":\"rtwaenuuzko\"}") + .toObject(Request.class); + Assertions.assertEquals("vbbejdcng", model.id()); + Assertions.assertEquals("m", model.addr()); + Assertions.assertEquals("kufgmj", model.host()); + Assertions.assertEquals("wr", model.method()); + Assertions.assertEquals("rtwaenuuzko", model.useragent()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java new file mode 100644 index 000000000000..1d5441addecb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RetentionPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RetentionPolicy model = BinaryData + .fromString("{\"days\":1398747720,\"lastUpdatedTime\":\"2021-04-29T02:40:58Z\",\"status\":\"enabled\"}") + .toObject(RetentionPolicy.class); + Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RetentionPolicy model = new RetentionPolicy().withDays(1398747720).withStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(RetentionPolicy.class); + Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java new file mode 100644 index 000000000000..b9a11f64be55 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapInner model = BinaryData.fromString( + "{\"properties\":{\"description\":\"tskzbbtdzumveek\",\"type\":\"wozuhkf\",\"creationDate\":\"2021-11-15T23:25:51Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"f\"]},\"id\":\"luu\",\"name\":\"dttouwaboekqvkel\",\"type\":\"smv\"}") + .toObject(ScopeMapInner.class); + Assertions.assertEquals("tskzbbtdzumveek", model.properties().description()); + Assertions.assertEquals("f", model.properties().actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapInner model = new ScopeMapInner().withProperties( + new ScopeMapProperties().withDescription("tskzbbtdzumveek").withActions(Arrays.asList("f"))); + model = BinaryData.fromObject(model).toObject(ScopeMapInner.class); + Assertions.assertEquals("tskzbbtdzumveek", model.properties().description()); + Assertions.assertEquals("f", model.properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java new file mode 100644 index 000000000000..fd394c8d9c6e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"description\":\"tfdygpfqb\",\"type\":\"ceopzfqrhhuaopp\",\"creationDate\":\"2021-12-04T10:32:02Z\",\"provisioningState\":\"Failed\",\"actions\":[\"ol\",\"dahzxctobg\",\"kdmoi\"]},\"id\":\"ostmgrcf\",\"name\":\"unrmfqjhhkxb\",\"type\":\"vjymjhxxjyngud\"},{\"properties\":{\"description\":\"r\",\"type\":\"wbxqzvszjfau\",\"creationDate\":\"2021-09-23T21:18:01Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"ivetvtcq\",\"qtdo\"]},\"id\":\"cbxvwvxyslqbh\",\"name\":\"fxoblytkb\",\"type\":\"mpew\"}],\"nextLink\":\"fbkrvrnsvs\"}") + .toObject(ScopeMapListResult.class); + Assertions.assertEquals("tfdygpfqb", model.value().get(0).properties().description()); + Assertions.assertEquals("ol", model.value().get(0).properties().actions().get(0)); + Assertions.assertEquals("fbkrvrnsvs", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java new file mode 100644 index 000000000000..871159a741a2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapProperties model = BinaryData.fromString( + "{\"description\":\"wyjsflhhcaalnjix\",\"type\":\"xyawj\",\"creationDate\":\"2021-08-07T05:01:18Z\",\"provisioningState\":\"Failed\",\"actions\":[\"lyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"]}") + .toObject(ScopeMapProperties.class); + Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); + Assertions.assertEquals("lyjpk", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapProperties model = new ScopeMapProperties().withDescription("wyjsflhhcaalnjix") + .withActions(Arrays.asList("lyjpk", "idzyexznelixhnr", "tfolhbnx")); + model = BinaryData.fromObject(model).toObject(ScopeMapProperties.class); + Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); + Assertions.assertEquals("lyjpk", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java new file mode 100644 index 000000000000..3adedeebb698 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapPropertiesUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapPropertiesUpdateParameters model + = BinaryData.fromString("{\"description\":\"hxg\",\"actions\":[\"mgucna\",\"kteo\"]}") + .toObject(ScopeMapPropertiesUpdateParameters.class); + Assertions.assertEquals("hxg", model.description()); + Assertions.assertEquals("mgucna", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapPropertiesUpdateParameters model = new ScopeMapPropertiesUpdateParameters().withDescription("hxg") + .withActions(Arrays.asList("mgucna", "kteo")); + model = BinaryData.fromObject(model).toObject(ScopeMapPropertiesUpdateParameters.class); + Assertions.assertEquals("hxg", model.description()); + Assertions.assertEquals("mgucna", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java new file mode 100644 index 000000000000..b476c65ed449 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapUpdateParameters model = BinaryData.fromString( + "{\"properties\":{\"description\":\"laulppg\",\"actions\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"]}}") + .toObject(ScopeMapUpdateParameters.class); + Assertions.assertEquals("laulppg", model.description()); + Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("laulppg") + .withActions(Arrays.asList("pnapnyiropuh", "igvpgylg", "git", "medjvcslynqwwncw")); + model = BinaryData.fromObject(model).toObject(ScopeMapUpdateParameters.class); + Assertions.assertEquals("laulppg", model.description()); + Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java new file mode 100644 index 000000000000..b389686ded62 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScopeMapsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"description\":\"ziycslevufuztck\",\"type\":\"h\",\"creationDate\":\"2021-05-19T13:18:23Z\",\"provisioningState\":\"Succeeded\",\"actions\":[\"gzulwmmrqzzr\",\"jvpglydzgk\",\"vqeevtoep\",\"yutnwytpzdmov\"]},\"id\":\"fvaawzqa\",\"name\":\"f\",\"type\":\"gzuriglaecxndt\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ScopeMap response = manager.scopeMaps() + .define("vofqzhvfc") + .withExistingRegistry("qxepnylbfuaj", "yjt") + .withProperties(new ScopeMapProperties().withDescription("fmo") + .withActions(Arrays.asList("vwzjbhyz", "xjrk", "mbtrnegvmnvu"))) + .create(); + + Assertions.assertEquals("ziycslevufuztck", response.properties().description()); + Assertions.assertEquals("gzulwmmrqzzr", response.properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java new file mode 100644 index 000000000000..7a327d04cd6e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScopeMapsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.scopeMaps().delete("l", "chp", "db", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java new file mode 100644 index 000000000000..c680cde6dd85 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScopeMapsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"description\":\"plmag\",\"type\":\"cyohpfkyrkdbd\",\"creationDate\":\"2021-11-23T10:21:46Z\",\"provisioningState\":\"Creating\",\"actions\":[\"kmnwqjnobaiyhddv\",\"acegfnmntf\"]},\"id\":\"vm\",\"name\":\"mfnczd\",\"type\":\"vvbalx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ScopeMap response = manager.scopeMaps() + .getWithResponse("vudtjuewbcihx", "uwhcjyxccybv", "ayakkudzpx", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("plmag", response.properties().description()); + Assertions.assertEquals("kmnwqjnobaiyhddv", response.properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java new file mode 100644 index 000000000000..ee3e6ad5c775 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScopeMapsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"description\":\"vlerchpqbmfpjba\",\"type\":\"idfcxsspuunnoxyh\",\"creationDate\":\"2021-03-12T10:30:45Z\",\"provisioningState\":\"Failed\",\"actions\":[\"rihpfhoq\",\"aaewdaomdjv\",\"pjxxkzb\",\"msgeivsiykzk\"]},\"id\":\"cjdx\",\"name\":\"nbzoggcu\",\"type\":\"apzwyrpgog\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.scopeMaps().list("evwrdnhfuk", "vsjcswsmystuluqy", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("vlerchpqbmfpjba", response.iterator().next().properties().description()); + Assertions.assertEquals("rihpfhoq", response.iterator().next().properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java new file mode 100644 index 000000000000..8e06cc605827 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Sku; +import com.azure.resourcemanager.containerregistry.generated.models.SkuName; +import org.junit.jupiter.api.Assertions; + +public final class SkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Sku model = BinaryData.fromString("{\"name\":\"Classic\",\"tier\":\"Classic\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.CLASSIC, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Sku model = new Sku().withName(SkuName.CLASSIC); + model = BinaryData.fromObject(model).toObject(Sku.class); + Assertions.assertEquals(SkuName.CLASSIC, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java new file mode 100644 index 000000000000..214e6703025d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Source; +import org.junit.jupiter.api.Assertions; + +public final class SourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Source model + = BinaryData.fromString("{\"addr\":\"uhhziuiefozbhdm\",\"instanceID\":\"l\"}").toObject(Source.class); + Assertions.assertEquals("uhhziuiefozbhdm", model.addr()); + Assertions.assertEquals("l", model.instanceID()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java new file mode 100644 index 000000000000..ac752c4d4f79 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Status; + +public final class StatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Status model = BinaryData.fromString( + "{\"displayStatus\":\"svqwhbmdgbbjfd\",\"message\":\"mbmbexppbh\",\"timestamp\":\"2021-09-17T16:41:16Z\"}") + .toObject(Status.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java new file mode 100644 index 000000000000..b3a27f018f4b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class SyncUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SyncUpdateProperties model = BinaryData + .fromString( + "{\"schedule\":\"svlxotogtwrup\",\"syncWindow\":\"PT119H24M20S\",\"messageTtl\":\"PT72H58M15S\"}") + .toObject(SyncUpdateProperties.class); + Assertions.assertEquals("svlxotogtwrup", model.schedule()); + Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("svlxotogtwrup") + .withSyncWindow(Duration.parse("PT119H24M20S")) + .withMessageTtl(Duration.parse("PT72H58M15S")); + model = BinaryData.fromObject(model).toObject(SyncUpdateProperties.class); + Assertions.assertEquals("svlxotogtwrup", model.schedule()); + Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java new file mode 100644 index 000000000000..de6f81b8004b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.Target; +import org.junit.jupiter.api.Assertions; + +public final class TargetTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Target model = BinaryData.fromString( + "{\"mediaType\":\"tlmngu\",\"size\":8390359388948965260,\"digest\":\"ldsyuuximerqfob\",\"length\":8923665884777818679,\"repository\":\"bykutw\",\"url\":\"hpagm\",\"tag\":\"skdsnfdsdoakg\",\"name\":\"lmkk\",\"version\":\"vdlhewpusdsttwv\"}") + .toObject(Target.class); + Assertions.assertEquals("tlmngu", model.mediaType()); + Assertions.assertEquals(8390359388948965260L, model.size()); + Assertions.assertEquals("ldsyuuximerqfob", model.digest()); + Assertions.assertEquals(8923665884777818679L, model.length()); + Assertions.assertEquals("bykutw", model.repository()); + Assertions.assertEquals("hpagm", model.url()); + Assertions.assertEquals("skdsnfdsdoakg", model.tag()); + Assertions.assertEquals("lmkk", model.name()); + Assertions.assertEquals("vdlhewpusdsttwv", model.version()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java new file mode 100644 index 000000000000..89b275aa4c02 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties; + +public final class TlsCertificatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TlsCertificateProperties model = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"b\"}") + .toObject(TlsCertificateProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java new file mode 100644 index 000000000000..107a0bc9536c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.TlsProperties; + +public final class TlsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TlsProperties model = BinaryData + .fromString( + "{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"gnxytxhpzxbz\"}}") + .toObject(TlsProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java new file mode 100644 index 000000000000..60c1f5545a0d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; +import com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class TokenPasswordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TokenPassword model = BinaryData.fromString( + "{\"creationTime\":\"2021-01-13T20:24:26Z\",\"expiry\":\"2021-06-09T11:05:27Z\",\"name\":\"password2\",\"value\":\"tpngjcrcczsqpjh\"}") + .toObject(TokenPassword.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TokenPassword model = new TokenPassword().withCreationTime(OffsetDateTime.parse("2021-01-13T20:24:26Z")) + .withExpiry(OffsetDateTime.parse("2021-06-09T11:05:27Z")) + .withName(TokenPasswordName.PASSWORD2); + model = BinaryData.fromObject(model).toObject(TokenPassword.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java new file mode 100644 index 000000000000..a62fd97da183 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TokensDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.tokens().delete("jazysdzhezwwvaiq", "uvvfonkp", "hqyikvy", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java new file mode 100644 index 000000000000..341738f59d6c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy; +import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType; +import org.junit.jupiter.api.Assertions; + +public final class TrustPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TrustPolicy model + = BinaryData.fromString("{\"type\":\"Notary\",\"status\":\"disabled\"}").toObject(TrustPolicy.class); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TrustPolicy model = new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.DISABLED); + model = BinaryData.fromObject(model).toObject(TrustPolicy.class); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java new file mode 100644 index 000000000000..a1b8e18f62bb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties; + +public final class UserIdentityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserIdentityProperties model + = BinaryData.fromString("{\"principalId\":\"norcjxvsnbyxqab\",\"clientId\":\"ocpcy\"}") + .toObject(UserIdentityProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserIdentityProperties model = new UserIdentityProperties(); + model = BinaryData.fromObject(model).toObject(UserIdentityProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java new file mode 100644 index 000000000000..9f357cf5f573 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookCreateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookCreateParameters model = BinaryData.fromString( + "{\"tags\":{\"bpodxunkbebxm\":\"kzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\",\"xe\":\"p\"},\"location\":\"mnzb\",\"properties\":{\"serviceUri\":\"hjpglkf\",\"customHeaders\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"status\":\"enabled\",\"scope\":\"cffgdkzzewk\",\"actions\":[\"push\",\"quarantine\"]}}") + .toObject(WebhookCreateParameters.class); + Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); + Assertions.assertEquals("mnzb", model.location()); + Assertions.assertEquals("hjpglkf", model.serviceUri()); + Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("cffgdkzzewk", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookCreateParameters model = new WebhookCreateParameters() + .withTags(mapOf("bpodxunkbebxm", "kzgxhurip", "oievseotgqrlltm", "byyntwlrbqt", "jefuzmuvpbttdumo", + "wlauwzizxbmpg", "xe", "p")) + .withLocation("mnzb") + .withServiceUri("hjpglkf") + .withCustomHeaders(mapOf("lfphsdyhtozfikd", "dneu", "zonosgg", "wwquuvxzxclvithh", "ljuti", "hcohfwdsjnk")) + .withStatus(WebhookStatus.ENABLED) + .withScope("cffgdkzzewk") + .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.QUARANTINE)); + model = BinaryData.fromObject(model).toObject(WebhookCreateParameters.class); + Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); + Assertions.assertEquals("mnzb", model.location()); + Assertions.assertEquals("hjpglkf", model.serviceUri()); + Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("cffgdkzzewk", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java new file mode 100644 index 000000000000..6cbe5f26240d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import org.junit.jupiter.api.Assertions; + +public final class WebhookInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookInner model = BinaryData.fromString( + "{\"properties\":{\"status\":\"disabled\",\"scope\":\"fznudaodvxzb\",\"actions\":[\"chart_push\",\"delete\",\"chart_push\",\"push\"],\"provisioningState\":\"Canceled\"},\"location\":\"dbh\",\"tags\":{\"evfiwjmygt\":\"rzdzucerscdnt\",\"pyqs\":\"sslswtmweriof\",\"vwiwubmwmbesld\":\"mwabnetshhszhedp\",\"wtppjflcxogaoko\":\"k\"},\"id\":\"z\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}") + .toObject(WebhookInner.class); + Assertions.assertEquals("dbh", model.location()); + Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.properties().status()); + Assertions.assertEquals("fznudaodvxzb", model.properties().scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java new file mode 100644 index 000000000000..d4de9a95ef0d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import org.junit.jupiter.api.Assertions; + +public final class WebhookListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"status\":\"disabled\",\"scope\":\"rjxgciqib\",\"actions\":[\"push\"],\"provisioningState\":\"Failed\"},\"location\":\"dqrhzoymib\",\"tags\":{\"wfluszdt\":\"yiba\"},\"id\":\"hrkwo\",\"name\":\"yyv\",\"type\":\"qacpiex\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"wbwo\",\"actions\":[\"push\",\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"tdtkcn\",\"tags\":{\"i\":\"bpokulpiujwaasip\",\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\",\"h\":\"koymkcd\"},\"id\":\"pkkpw\",\"name\":\"reqnovvqfov\",\"type\":\"jxywsuws\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"sytgadgvraea\",\"actions\":[\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"arrwlquu\",\"tags\":{\"fpubjibwwi\":\"qkacewii\"},\"id\":\"tohqkvpuvksgp\",\"name\":\"saknynfsyn\",\"type\":\"jphuopxodlqi\"}],\"nextLink\":\"torzih\"}") + .toObject(WebhookListResult.class); + Assertions.assertEquals("dqrhzoymib", model.value().get(0).location()); + Assertions.assertEquals("yiba", model.value().get(0).tags().get("wfluszdt")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.value().get(0).properties().status()); + Assertions.assertEquals("rjxgciqib", model.value().get(0).properties().scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.value().get(0).properties().actions().get(0)); + Assertions.assertEquals("torzih", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java new file mode 100644 index 000000000000..9055950419d5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesCreateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookPropertiesCreateParameters model = BinaryData.fromString( + "{\"serviceUri\":\"crailvpn\",\"customHeaders\":{\"hdlxyjrxsagafcn\":\"uflrwd\",\"apnedgfbcvkc\":\"hgw\",\"pkeqdcvdrhvoo\":\"q\"},\"status\":\"disabled\",\"scope\":\"bobzdopcjwvnhd\",\"actions\":[\"chart_delete\"]}") + .toObject(WebhookPropertiesCreateParameters.class); + Assertions.assertEquals("crailvpn", model.serviceUri()); + Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("crailvpn") + .withCustomHeaders(mapOf("hdlxyjrxsagafcn", "uflrwd", "apnedgfbcvkc", "hgw", "pkeqdcvdrhvoo", "q")) + .withStatus(WebhookStatus.DISABLED) + .withScope("bobzdopcjwvnhd") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE)); + model = BinaryData.fromObject(model).toObject(WebhookPropertiesCreateParameters.class); + Assertions.assertEquals("crailvpn", model.serviceUri()); + Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java new file mode 100644 index 000000000000..b93f18b881e2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookProperties model = BinaryData.fromString( + "{\"status\":\"disabled\",\"scope\":\"gxtibqdxbxw\",\"actions\":[\"delete\",\"chart_delete\",\"delete\",\"delete\"],\"provisioningState\":\"Canceled\"}") + .toObject(WebhookProperties.class); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("gxtibqdxbxw", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java new file mode 100644 index 000000000000..1a99ac01d457 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookPropertiesUpdateParameters model = BinaryData.fromString( + "{\"serviceUri\":\"iyzvqtmnub\",\"customHeaders\":{\"mond\":\"pzk\",\"gkopkwhojvpajqgx\":\"mquxvypo\",\"qvmkcxo\":\"smocmbq\"},\"status\":\"disabled\",\"scope\":\"helxprglya\",\"actions\":[\"chart_push\",\"push\"]}") + .toObject(WebhookPropertiesUpdateParameters.class); + Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); + Assertions.assertEquals("pzk", model.customHeaders().get("mond")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("helxprglya", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("iyzvqtmnub") + .withCustomHeaders(mapOf("mond", "pzk", "gkopkwhojvpajqgx", "mquxvypo", "qvmkcxo", "smocmbq")) + .withStatus(WebhookStatus.DISABLED) + .withScope("helxprglya") + .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH)); + model = BinaryData.fromObject(model).toObject(WebhookPropertiesUpdateParameters.class); + Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); + Assertions.assertEquals("pzk", model.customHeaders().get("mond")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("helxprglya", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java new file mode 100644 index 000000000000..8af5c15cd46d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookUpdateParameters model = BinaryData.fromString( + "{\"tags\":{\"mutwuoe\":\"xcxrsl\"},\"properties\":{\"serviceUri\":\"khjwn\",\"customHeaders\":{\"vmbmp\":\"sluicpdggkzz\",\"uefywsbpfvmwy\":\"xmodf\"},\"status\":\"enabled\",\"scope\":\"uyfta\",\"actions\":[\"quarantine\"]}}") + .toObject(WebhookUpdateParameters.class); + Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); + Assertions.assertEquals("khjwn", model.serviceUri()); + Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("uyfta", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookUpdateParameters model = new WebhookUpdateParameters().withTags(mapOf("mutwuoe", "xcxrsl")) + .withServiceUri("khjwn") + .withCustomHeaders(mapOf("vmbmp", "sluicpdggkzz", "uefywsbpfvmwy", "xmodf")) + .withStatus(WebhookStatus.ENABLED) + .withScope("uyfta") + .withActions(Arrays.asList(WebhookAction.QUARANTINE)); + model = BinaryData.fromObject(model).toObject(WebhookUpdateParameters.class); + Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); + Assertions.assertEquals("khjwn", model.serviceUri()); + Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("uyfta", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java new file mode 100644 index 000000000000..db164bf7c3e3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +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 reactor.core.publisher.Mono; + +public final class WebhooksCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"status\":\"disabled\",\"scope\":\"ealzxwhcansymoyq\",\"actions\":[\"delete\",\"chart_delete\",\"delete\"],\"provisioningState\":\"Succeeded\"},\"location\":\"bkbxgomfa\",\"tags\":{\"e\":\"asqvd\",\"uxakjsqzhzbezk\":\"y\",\"kgfmocwahpq\":\"imsidxasicddyvvj\"},\"id\":\"atjeaahh\",\"name\":\"jhhn\",\"type\":\"kzyb\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Webhook response = manager.webhooks() + .define("uzjyihsasbhudypo") + .withRegion("hqlyvijo") + .withExistingRegistry("hvvmuvgpmun", "qsxvmhf") + .withTags(mapOf("oobrlttyms", "emslynsqyrp", "nfwqzdzgtilaxhn", "nygq")) + .withServiceUri("iv") + .withCustomHeaders( + mapOf("pwpgclrci", "yzunbixxrtikv", "frkenxpmyyefrp", "tso", "pqfrtqlkz", "pdnqqskawaoqvmmb")) + .withStatus(WebhookStatus.DISABLED) + .withScope("itgvkx") + .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH, WebhookAction.PUSH, + WebhookAction.QUARANTINE)) + .create(); + + Assertions.assertEquals("bkbxgomfa", response.location()); + Assertions.assertEquals("asqvd", response.tags().get("e")); + Assertions.assertEquals(WebhookStatus.DISABLED, response.properties().status()); + Assertions.assertEquals("ealzxwhcansymoyq", response.properties().scope()); + Assertions.assertEquals(WebhookAction.DELETE, response.properties().actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java new file mode 100644 index 000000000000..ff807052aa97 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WebhooksDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.webhooks().delete("nzeyqxtjj", "zqlqhyc", "vodggxdbee", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java new file mode 100644 index 000000000000..8290f6504732 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WebhooksGetCallbackConfigWithResponseMockTests { + @Test + public void testGetCallbackConfigWithResponse() throws Exception { + String responseStr + = "{\"serviceUri\":\"qvlgafcqusrdvetn\",\"customHeaders\":{\"ewipm\":\"tutnwlduycvuzhyr\",\"gsjj\":\"ekdxuku\",\"hhzjhfj\":\"undxgketw\"}}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CallbackConfig response = manager.webhooks() + .getCallbackConfigWithResponse("uvyinzqodfvpgs", "oxgsgbpfgzdjtx", "zflbqvg", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qvlgafcqusrdvetn", response.serviceUri()); + Assertions.assertEquals("tutnwlduycvuzhyr", response.customHeaders().get("ewipm")); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java new file mode 100644 index 000000000000..33c1a3609153 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WebhooksGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"status\":\"disabled\",\"scope\":\"g\",\"actions\":[\"chart_delete\",\"chart_delete\",\"quarantine\",\"chart_delete\"],\"provisioningState\":\"Canceled\"},\"location\":\"ffwafq\",\"tags\":{\"unzo\":\"daspavehhrvk\",\"cxgkmoyxcdyui\":\"ud\",\"aeoisrvh\":\"hmfdnbzydvfvfcj\"},\"id\":\"gorf\",\"name\":\"ukiscvwmzhw\",\"type\":\"lefaxvxilcbtgn\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Webhook response + = manager.webhooks().getWithResponse("fmzzsdymbrny", "u", "m", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("ffwafq", response.location()); + Assertions.assertEquals("daspavehhrvk", response.tags().get("unzo")); + Assertions.assertEquals(WebhookStatus.DISABLED, response.properties().status()); + Assertions.assertEquals("g", response.properties().scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, response.properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java new file mode 100644 index 000000000000..91b193977ca8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.Webhook; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WebhooksListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"status\":\"enabled\",\"scope\":\"fgiagtcojocqwo\",\"actions\":[\"delete\",\"delete\",\"chart_push\"],\"provisioningState\":\"Updating\"},\"location\":\"fzldmozu\",\"tags\":{\"ysownbtgkbug\":\"fsbtkad\",\"pe\":\"jqctojcmisofie\",\"hihihlhzdsqtzbsr\":\"ojyqdhcuplcplcw\",\"hfgmvecactxm\":\"nowc\"},\"id\":\"oteyowc\",\"name\":\"uqovekqvgqouwif\",\"type\":\"mpjw\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.webhooks().list("mieknlraria", "wiuagydwqf", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("fzldmozu", response.iterator().next().location()); + Assertions.assertEquals("fsbtkad", response.iterator().next().tags().get("ysownbtgkbug")); + Assertions.assertEquals(WebhookStatus.ENABLED, response.iterator().next().properties().status()); + Assertions.assertEquals("fgiagtcojocqwo", response.iterator().next().properties().scope()); + Assertions.assertEquals(WebhookAction.DELETE, response.iterator().next().properties().actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java new file mode 100644 index 000000000000..68cd8bb03dac --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; +import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WebhooksPingWithResponseMockTests { + @Test + public void testPingWithResponse() throws Exception { + String responseStr = "{\"id\":\"vyklxuby\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ContainerRegistryManager manager = ContainerRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EventInfo response = manager.webhooks() + .pingWithResponse("ivqikfxcvhr", "sphuagrttikteus", "c", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("vyklxuby", response.id()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml new file mode 100644 index 000000000000..c401729cef54 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry +commit: eb320d1d85f5b46c3cfe6cf60a1f0de4ef3b01d9 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 99040f2dc72c..6a18051e47df 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.55.0-beta.2 (Unreleased) +## 1.0.0 (Unreleased) ### Breaking Changes diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md index b565d807f7f0..d8d02d6d5f38 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.53.1 + 2.55.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerregistry/ci.yml b/sdk/containerregistry/ci.yml index 8ae2003205f3..c728f99b38b8 100644 --- a/sdk/containerregistry/ci.yml +++ b/sdk/containerregistry/ci.yml @@ -38,18 +38,22 @@ pr: - sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml parameters: -- name: release_dependsonlivetests - displayName: 'Release depends on live tests' - type: boolean - default: true -- name: release_azurecontainerscontainerregistry - displayName: 'azure-containers-containerregistry' - type: boolean - default: true -- name: release_azureresourcemanagercontainerregistry - displayName: 'azure-resourcemanager-containerregistry' - type: boolean - default: false + - name: release_dependsonlivetests + displayName: Release depends on live tests + type: boolean + default: true + - name: release_azurecontainerscontainerregistry + displayName: azure-containers-containerregistry + type: boolean + default: true + - name: release_azureresourcemanagercontainerregistry + displayName: azure-resourcemanager-containerregistry + type: boolean + default: false + - name: release_azureresourcemanagercontainerregistrygenerated + displayName: azure-resourcemanager-containerregistry-generated + type: boolean + default: false extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -64,9 +68,12 @@ extends: groupId: com.azure.resourcemanager safeName: azureresourcemanagercontainerregistry releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerregistry }} + - name: azure-resourcemanager-containerregistry-generated + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercontainerregistrygenerated + releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerregistrygenerated }} AdditionalModules: - name: azure-containers-containerregistry-perf groupId: com.azure - # required by the above perf library - name: perf-test-core groupId: com.azure diff --git a/sdk/containerregistry/pom.xml b/sdk/containerregistry/pom.xml index 75c9894e38f6..47c38aa10164 100644 --- a/sdk/containerregistry/pom.xml +++ b/sdk/containerregistry/pom.xml @@ -12,5 +12,6 @@ azure-containers-containerregistry azure-containers-containerregistry-perf azure-resourcemanager-containerregistry + azure-resourcemanager-containerregistry-generated From b8bc5ecdd59664c78fa87dd1716bae6c2d1930ec Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 22 Jan 2026 15:23:29 +0800 Subject: [PATCH 02/16] Revert "Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2025-11-01, SDK Release Type: stable, and CommitSHA: 'eb320d1d85f5b46c3cfe6cf60a1f0de4ef3b01d9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5777146 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release." This reverts commit 174d9f9a3399567c85cfeeed4e0e3c28188d23eb. --- eng/versioning/version_client.txt | 1 - .../CHANGELOG.md | 8 - .../README.md | 102 - .../SAMPLE.md | 1838 -------------- .../pom.xml | 73 - .../generated/ContainerRegistryManager.java | 429 ---- .../generated/fluent/CacheRulesClient.java | 268 -- .../fluent/ConnectedRegistriesClient.java | 338 --- .../ContainerRegistryManagementClient.java | 118 - .../fluent/CredentialSetsClient.java | 275 --- .../generated/fluent/OperationsClient.java | 40 - .../PrivateEndpointConnectionsClient.java | 209 -- .../generated/fluent/RegistriesClient.java | 577 ----- .../generated/fluent/ReplicationsClient.java | 270 -- .../generated/fluent/ScopeMapsClient.java | 268 -- .../generated/fluent/TokensClient.java | 268 -- .../generated/fluent/WebhooksClient.java | 362 --- .../fluent/models/CacheRuleInner.java | 155 -- .../models/CacheRuleUpdateProperties.java | 87 - .../fluent/models/CallbackConfigInner.java | 94 - .../fluent/models/ConnectedRegistryInner.java | 155 -- .../ConnectedRegistryUpdateProperties.java | 212 -- .../fluent/models/CredentialSetInner.java | 184 -- .../models/CredentialSetUpdateProperties.java | 94 - .../fluent/models/EventInfoInner.java | 85 - .../generated/fluent/models/EventInner.java | 110 - .../GenerateCredentialsResultInner.java | 95 - .../models/OperationDefinitionInner.java | 158 -- .../models/OperationPropertiesDefinition.java | 77 - .../PrivateEndpointConnectionInner.java | 157 -- .../models/PrivateLinkResourceInner.java | 144 -- .../fluent/models/RegistryInner.java | 239 -- .../RegistryListCredentialsResultInner.java | 95 - .../models/RegistryNameStatusInner.java | 109 - .../RegistryPropertiesUpdateParameters.java | 360 --- .../models/RegistryUsageListResultInner.java | 77 - .../fluent/models/ReplicationInner.java | 181 -- ...ReplicationUpdateParametersProperties.java | 93 - .../fluent/models/ScopeMapInner.java | 155 -- .../ScopeMapPropertiesUpdateParameters.java | 122 - .../generated/fluent/models/TokenInner.java | 155 -- .../fluent/models/TokenUpdateProperties.java | 143 -- .../generated/fluent/models/WebhookInner.java | 152 -- .../WebhookPropertiesCreateParameters.java | 213 -- .../WebhookPropertiesUpdateParameters.java | 212 -- .../generated/fluent/models/package-info.java | 11 - .../generated/fluent/package-info.java | 11 - .../implementation/CacheRuleImpl.java | 139 -- .../implementation/CacheRulesClientImpl.java | 980 -------- .../implementation/CacheRulesImpl.java | 156 -- .../implementation/CallbackConfigImpl.java | 43 - .../ConnectedRegistriesClientImpl.java | 1248 ---------- .../ConnectedRegistriesImpl.java | 167 -- .../implementation/ConnectedRegistryImpl.java | 175 -- ...tainerRegistryManagementClientBuilder.java | 138 -- ...ContainerRegistryManagementClientImpl.java | 432 ---- .../implementation/CredentialSetImpl.java | 161 -- .../CredentialSetsClientImpl.java | 1005 -------- .../implementation/CredentialSetsImpl.java | 156 -- .../generated/implementation/EventImpl.java | 42 - .../implementation/EventInfoImpl.java | 32 - .../GenerateCredentialsResultImpl.java | 44 - .../OperationDefinitionImpl.java | 50 - .../implementation/OperationsClientImpl.java | 213 -- .../implementation/OperationsImpl.java | 45 - .../PrivateEndpointConnectionImpl.java | 134 - .../PrivateEndpointConnectionsClientImpl.java | 793 ------ .../PrivateEndpointConnectionsImpl.java | 167 -- .../PrivateLinkResourceImpl.java | 50 - .../implementation/RegistriesClientImpl.java | 2200 ----------------- .../implementation/RegistriesImpl.java | 313 --- .../implementation/RegistryImpl.java | 309 --- .../RegistryListCredentialsResultImpl.java | 44 - .../RegistryNameStatusImpl.java | 40 - .../RegistryUsageListResultImpl.java | 40 - .../implementation/ReplicationImpl.java | 187 -- .../ReplicationsClientImpl.java | 987 -------- .../implementation/ReplicationsImpl.java | 156 -- .../implementation/ResourceManagerUtils.java | 195 -- .../implementation/ScopeMapImpl.java | 145 -- .../implementation/ScopeMapsClientImpl.java | 976 -------- .../implementation/ScopeMapsImpl.java | 156 -- .../generated/implementation/TokenImpl.java | 151 -- .../implementation/TokensClientImpl.java | 972 -------- .../generated/implementation/TokensImpl.java | 156 -- .../generated/implementation/WebhookImpl.java | 263 -- .../implementation/WebhooksClientImpl.java | 1363 ---------- .../implementation/WebhooksImpl.java | 217 -- .../models/CacheRulesListResult.java | 96 - .../models/ConnectedRegistryListResult.java | 97 - .../models/CredentialSetListResult.java | 96 - .../models/EventListResult.java | 96 - .../models/OperationListResult.java | 97 - .../PrivateEndpointConnectionListResult.java | 99 - .../models/PrivateLinkResourceListResult.java | 98 - .../models/RegistryListResult.java | 96 - .../models/ReplicationListResult.java | 96 - .../models/ScopeMapListResult.java | 96 - .../models/TokenListResult.java | 96 - .../models/WebhookListResult.java | 96 - .../implementation/package-info.java | 11 - .../generated/models/Action.java | 46 - .../generated/models/ActionsRequired.java | 51 - .../models/ActivationProperties.java | 73 - .../generated/models/ActivationStatus.java | 51 - .../generated/models/Actor.java | 74 - .../generated/models/AuditLogStatus.java | 51 - .../generated/models/AuthCredential.java | 157 -- .../AzureADAuthenticationAsArmPolicy.java | 87 - ...zureADAuthenticationAsArmPolicyStatus.java | 52 - .../generated/models/CacheRule.java | 191 -- .../generated/models/CacheRuleProperties.java | 182 -- .../models/CacheRuleUpdateParameters.java | 100 - .../generated/models/CacheRules.java | 146 -- .../generated/models/CallbackConfig.java | 34 - .../generated/models/CertificateType.java | 46 - .../generated/models/ConnectedRegistries.java | 175 -- .../generated/models/ConnectedRegistry.java | 264 -- .../models/ConnectedRegistryMode.java | 61 - .../models/ConnectedRegistryProperties.java | 369 --- .../ConnectedRegistryUpdateParameters.java | 197 -- .../generated/models/ConnectionState.java | 61 - .../generated/models/ConnectionStatus.java | 61 - .../models/ContainerRegistryResourceType.java | 51 - .../generated/models/CredentialHealth.java | 108 - .../models/CredentialHealthStatus.java | 51 - .../generated/models/CredentialName.java | 46 - .../generated/models/CredentialSet.java | 227 -- .../models/CredentialSetProperties.java | 156 -- .../models/CredentialSetUpdateParameters.java | 131 - .../generated/models/CredentialSets.java | 146 -- .../generated/models/DefaultAction.java | 51 - .../generated/models/EncryptionProperty.java | 113 - .../generated/models/EncryptionStatus.java | 51 - .../generated/models/Event.java | 40 - .../generated/models/EventContent.java | 185 -- .../generated/models/EventInfo.java | 26 - .../generated/models/EventRequestMessage.java | 144 -- .../models/EventResponseMessage.java | 144 -- .../generated/models/ExportPolicy.java | 85 - .../generated/models/ExportPolicyStatus.java | 51 - .../models/GarbageCollectionProperties.java | 115 - .../models/GenerateCredentialsParameters.java | 149 -- .../models/GenerateCredentialsResult.java | 35 - .../generated/models/IPRule.java | 114 - .../generated/models/IdentityProperties.java | 160 -- .../models/ImportImageParameters.java | 182 -- .../generated/models/ImportMode.java | 52 - .../generated/models/ImportSource.java | 179 -- .../models/ImportSourceCredentials.java | 114 - .../generated/models/KeyVaultProperties.java | 165 -- .../generated/models/LogLevel.java | 66 - .../generated/models/LoggingProperties.java | 114 - .../models/LoginServerProperties.java | 89 - .../models/NetworkRuleBypassOptions.java | 51 - .../generated/models/NetworkRuleSet.java | 116 - .../generated/models/OperationDefinition.java | 57 - .../models/OperationDisplayDefinition.java | 125 - .../OperationLogSpecificationDefinition.java | 110 - ...perationMetricSpecificationDefinition.java | 161 -- ...erationServiceSpecificationDefinition.java | 100 - .../generated/models/Operations.java | 35 - .../generated/models/ParentProperties.java | 114 - .../generated/models/PasswordName.java | 56 - .../generated/models/Policies.java | 201 -- .../generated/models/PolicyStatus.java | 51 - .../generated/models/PrivateEndpoint.java | 85 - .../models/PrivateEndpointConnection.java | 190 -- .../PrivateEndpointConnectionProperties.java | 136 - .../models/PrivateEndpointConnections.java | 149 -- .../generated/models/PrivateLinkResource.java | 56 - .../models/PrivateLinkResourceProperties.java | 111 - .../PrivateLinkServiceConnectionState.java | 150 -- .../generated/models/ProvisioningState.java | 71 - .../generated/models/PublicNetworkAccess.java | 51 - .../generated/models/QuarantinePolicy.java | 85 - .../RegenerateCredentialParameters.java | 87 - .../generated/models/Registries.java | 377 --- .../generated/models/Registry.java | 550 ----- .../models/RegistryListCredentialsResult.java | 35 - .../models/RegistryNameCheckRequest.java | 117 - .../generated/models/RegistryNameStatus.java | 42 - .../generated/models/RegistryPassword.java | 91 - .../generated/models/RegistryProperties.java | 482 ---- .../models/RegistryUpdateParameters.java | 396 --- .../generated/models/RegistryUsage.java | 125 - .../models/RegistryUsageListResult.java | 28 - .../generated/models/RegistryUsageUnit.java | 51 - .../generated/models/Replication.java | 270 -- .../models/ReplicationProperties.java | 156 -- .../models/ReplicationUpdateParameters.java | 133 - .../generated/models/Replications.java | 146 -- .../generated/models/Request.java | 146 -- .../models/ResourceIdentityType.java | 66 - .../generated/models/RetentionPolicy.java | 132 - .../generated/models/RoleAssignmentMode.java | 51 - .../generated/models/ScopeMap.java | 207 -- .../generated/models/ScopeMapProperties.java | 173 -- .../models/ScopeMapUpdateParameters.java | 127 - .../generated/models/ScopeMaps.java | 146 -- .../generated/models/Sku.java | 102 - .../generated/models/SkuName.java | 61 - .../generated/models/SkuTier.java | 61 - .../generated/models/Source.java | 94 - .../generated/models/Status.java | 108 - .../models/StatusDetailProperties.java | 140 -- .../generated/models/SyncProperties.java | 219 -- .../models/SyncUpdateProperties.java | 153 -- .../generated/models/Target.java | 210 -- .../models/TlsCertificateProperties.java | 89 - .../generated/models/TlsProperties.java | 89 - .../generated/models/TlsStatus.java | 51 - .../generated/models/Token.java | 216 -- .../generated/models/TokenCertificate.java | 176 -- .../models/TokenCertificateName.java | 51 - .../models/TokenCredentialsProperties.java | 117 - .../generated/models/TokenPassword.java | 164 -- .../generated/models/TokenPasswordName.java | 51 - .../generated/models/TokenProperties.java | 176 -- .../generated/models/TokenStatus.java | 51 - .../models/TokenUpdateParameters.java | 144 -- .../generated/models/Tokens.java | 145 -- .../generated/models/TrustPolicy.java | 113 - .../generated/models/TrustPolicyType.java | 46 - .../models/UserIdentityProperties.java | 89 - .../generated/models/Webhook.java | 444 ---- .../generated/models/WebhookAction.java | 66 - .../models/WebhookCreateParameters.java | 255 -- .../generated/models/WebhookProperties.java | 133 - .../generated/models/WebhookStatus.java | 51 - .../models/WebhookUpdateParameters.java | 226 -- .../generated/models/Webhooks.java | 229 -- .../generated/models/ZoneRedundancy.java | 51 - .../generated/models/package-info.java | 11 - .../generated/package-info.java | 11 - .../src/main/java/module-info.java | 16 - ...registry-generated_apiview_properties.json | 264 -- ...-containerregistry-generated_metadata.json | 1 - .../proxy-config.json | 1 - .../reflect-config.json | 1 - ...ger-containerregistry-generated.properties | 1 - .../generated/CacheRulesCreateSamples.java | 31 - .../generated/CacheRulesDeleteSamples.java | 23 - .../generated/CacheRulesGetSamples.java | 24 - .../generated/CacheRulesListSamples.java | 23 - .../generated/CacheRulesUpdateSamples.java | 31 - .../ConnectedRegistriesCreateSamples.java | 44 - .../ConnectedRegistriesDeactivateSamples.java | 24 - .../ConnectedRegistriesDeleteSamples.java | 24 - .../ConnectedRegistriesGetSamples.java | 24 - .../ConnectedRegistriesListSamples.java | 23 - .../ConnectedRegistriesUpdateSamples.java | 46 - .../CredentialSetsCreateSamples.java | 38 - .../CredentialSetsDeleteSamples.java | 24 - .../generated/CredentialSetsGetSamples.java | 24 - .../generated/CredentialSetsListSamples.java | 23 - .../CredentialSetsUpdateSamples.java | 35 - .../generated/OperationsListSamples.java | 23 - ...pointConnectionsCreateOrUpdateSamples.java | 33 - ...ivateEndpointConnectionsDeleteSamples.java | 24 - .../PrivateEndpointConnectionsGetSamples.java | 24 - ...PrivateEndpointConnectionsListSamples.java | 23 - ...egistriesCheckNameAvailabilitySamples.java | 47 - .../generated/RegistriesCreateSamples.java | 91 - .../generated/RegistriesDeleteSamples.java | 23 - .../RegistriesGenerateCredentialsSamples.java | 30 - .../RegistriesGetByResourceGroupSamples.java | 24 - ...gistriesGetPrivateLinkResourceSamples.java | 25 - .../RegistriesImportImageSamples.java | 79 - .../RegistriesListByResourceGroupSamples.java | 23 - .../RegistriesListCredentialsSamples.java | 24 - ...striesListPrivateLinkResourcesSamples.java | 24 - .../generated/RegistriesListSamples.java | 23 - .../RegistriesListUsagesSamples.java | 23 - ...RegistriesRegenerateCredentialSamples.java | 28 - .../generated/RegistriesUpdateSamples.java | 50 - .../generated/ReplicationsCreateSamples.java | 65 - .../generated/ReplicationsDeleteSamples.java | 24 - .../generated/ReplicationsGetSamples.java | 24 - .../generated/ReplicationsListSamples.java | 23 - .../generated/ReplicationsUpdateSamples.java | 42 - .../generated/ScopeMapsCreateSamples.java | 32 - .../generated/ScopeMapsDeleteSamples.java | 23 - .../generated/ScopeMapsGetSamples.java | 24 - .../generated/ScopeMapsListSamples.java | 23 - .../generated/ScopeMapsUpdateSamples.java | 33 - .../generated/TokensCreateSamples.java | 39 - .../generated/TokensDeleteSamples.java | 23 - .../generated/generated/TokensGetSamples.java | 23 - .../generated/TokensListSamples.java | 23 - .../generated/TokensUpdateSamples.java | 38 - .../generated/WebhooksCreateSamples.java | 51 - .../generated/WebhooksDeleteSamples.java | 23 - .../WebhooksGetCallbackConfigSamples.java | 25 - .../generated/WebhooksGetSamples.java | 24 - .../generated/WebhooksListEventsSamples.java | 23 - .../generated/WebhooksListSamples.java | 23 - .../generated/WebhooksPingSamples.java | 24 - .../generated/WebhooksUpdateSamples.java | 52 - .../generated/ActivationPropertiesTests.java | 16 - .../generated/generated/ActorTests.java | 17 - ...AzureADAuthenticationAsArmPolicyTests.java | 27 - .../generated/CallbackConfigInnerTests.java | 20 - ...onnectedRegistriesDeactivateMockTests.java | 34 - .../ConnectedRegistriesDeleteMockTests.java | 33 - .../generated/EventContentTests.java | 39 - .../generated/EventInfoInnerTests.java | 17 - .../generated/EventRequestMessageTests.java | 43 - .../generated/ExportPolicyTests.java | 25 - .../GarbageCollectionPropertiesTests.java | 28 - .../generated/generated/IPRuleTests.java | 27 - .../generated/IdentityPropertiesTests.java | 44 - .../generated/LoggingPropertiesTests.java | 30 - .../generated/LoginServerPropertiesTests.java | 23 - .../generated/NetworkRuleSetTests.java | 35 - .../OperationDefinitionInnerTests.java | 36 - .../OperationDisplayDefinitionTests.java | 22 - .../generated/OperationListResultTests.java | 26 - ...rationLogSpecificationDefinitionTests.java | 21 - ...ionMetricSpecificationDefinitionTests.java | 24 - .../OperationPropertiesDefinitionTests.java | 30 - ...onServiceSpecificationDefinitionTests.java | 27 - .../generated/OperationsListMockTests.java | 62 - .../generated/generated/PoliciesTests.java | 54 - .../PrivateEndpointConnectionInnerTests.java | 46 - ...vateEndpointConnectionListResultTests.java | 28 - ...vateEndpointConnectionPropertiesTests.java | 41 - ...intConnectionsCreateOrUpdateMockTests.java | 57 - ...ateEndpointConnectionsDeleteMockTests.java | 34 - ...ntConnectionsGetWithResponseMockTests.java | 47 - ...ivateEndpointConnectionsListMockTests.java | 47 - .../generated/PrivateEndpointTests.java | 24 - .../PrivateLinkResourceInnerTests.java | 19 - .../PrivateLinkResourceListResultTests.java | 20 - .../PrivateLinkResourcePropertiesTests.java | 19 - ...rivateLinkServiceConnectionStateTests.java | 35 - .../generated/QuarantinePolicyTests.java | 25 - .../RegenerateCredentialParametersTests.java | 26 - ...NameAvailabilityWithResponseMockTests.java | 45 - .../generated/RegistriesDeleteMockTests.java | 33 - ...vateLinkResourceWithResponseMockTests.java | 39 - ...riesListPrivateLinkResourcesMockTests.java | 39 - ...striesListUsagesWithResponseMockTests.java | 43 - .../RegistryNameCheckRequestTests.java | 30 - .../RegistryNameStatusInnerTests.java | 21 - .../generated/RegistryPasswordTests.java | 20 - .../RegistryUsageListResultInnerTests.java | 23 - .../generated/RegistryUsageTests.java | 23 - .../generated/ReplicationInnerTests.java | 51 - .../generated/ReplicationListResultTests.java | 24 - .../generated/ReplicationPropertiesTests.java | 30 - ...cationUpdateParametersPropertiesTests.java | 26 - .../ReplicationUpdateParametersTests.java | 43 - .../ReplicationsCreateMockTests.java | 63 - .../ReplicationsDeleteMockTests.java | 34 - .../ReplicationsGetWithResponseMockTests.java | 43 - .../generated/ReplicationsListMockTests.java | 43 - .../generated/generated/RequestTests.java | 23 - .../generated/RetentionPolicyTests.java | 29 - .../generated/ScopeMapInnerTests.java | 31 - .../generated/ScopeMapListResultTests.java | 21 - .../generated/ScopeMapPropertiesTests.java | 30 - ...opeMapPropertiesUpdateParametersTests.java | 30 - .../ScopeMapUpdateParametersTests.java | 30 - .../generated/ScopeMapsCreateMockTests.java | 45 - .../generated/ScopeMapsDeleteMockTests.java | 33 - .../ScopeMapsGetWithResponseMockTests.java | 40 - .../generated/ScopeMapsListMockTests.java | 40 - .../generated/generated/SkuTests.java | 25 - .../generated/generated/SourceTests.java | 19 - .../generated/generated/StatusTests.java | 17 - .../generated/SyncUpdatePropertiesTests.java | 34 - .../generated/generated/TargetTests.java | 27 - .../TlsCertificatePropertiesTests.java | 16 - .../generated/TlsPropertiesTests.java | 18 - .../generated/TokenPasswordTests.java | 34 - .../generated/TokensDeleteMockTests.java | 33 - .../generated/generated/TrustPolicyTests.java | 29 - .../UserIdentityPropertiesTests.java | 23 - .../WebhookCreateParametersTests.java | 63 - .../generated/WebhookInnerTests.java | 25 - .../generated/WebhookListResultTests.java | 26 - ...ebhookPropertiesCreateParametersTests.java | 55 - .../generated/WebhookPropertiesTests.java | 23 - ...ebhookPropertiesUpdateParametersTests.java | 55 - .../WebhookUpdateParametersTests.java | 58 - .../generated/WebhooksCreateMockTests.java | 70 - .../generated/WebhooksDeleteMockTests.java | 33 - ...etCallbackConfigWithResponseMockTests.java | 41 - .../WebhooksGetWithResponseMockTests.java | 44 - .../generated/WebhooksListMockTests.java | 45 - .../WebhooksPingWithResponseMockTests.java | 38 - .../tsp-location.yaml | 4 - .../CHANGELOG.md | 2 +- .../README.md | 2 +- sdk/containerregistry/ci.yml | 33 +- sdk/containerregistry/pom.xml | 1 - 397 files changed, 15 insertions(+), 47867 deletions(-) delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index c2ac4aae9d71..c8cf241c93bd 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -516,7 +516,6 @@ com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-containerregistry-generated;1.0.0;1.0.0 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 com.azure.v2:azure-client-sdk-parent;2.0.0-beta.2;2.0.0-beta.2 diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md deleted file mode 100644 index 1f44a0e958fa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Release History - -## 1.0.0 (2026-01-21) - -- Azure Resource Manager ContainerRegistry client library for Java. This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). -### Features Added - -- Initial release for the azure-resourcemanager-containerregistry-generated Java SDK. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md deleted file mode 100644 index a21bb7372e7c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Azure Resource Manager ContainerRegistry client library for Java - -Azure Resource Manager ContainerRegistry client library for Java. - -This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -## We'd love to hear your feedback - -We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. - -If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. - -Thank you in advance for your collaboration. We really appreciate your time! - -## Documentation - -Various documentation is available to help you get started - -- [API reference documentation][docs] - -## Getting started - -### Prerequisites - -- [Java Development Kit (JDK)][jdk] with version 8 or above -- [Azure Subscription][azure_subscription] - -### Adding the package to your product - -[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-containerregistry-generated;current}) -```xml - - com.azure.resourcemanager - azure-resourcemanager-containerregistry-generated - 1.0.0 - -``` -[//]: # ({x-version-update-end}) - -### Include the recommended packages - -Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. - -[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. - -### Authentication - -Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. - -Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: - -```java -AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); -TokenCredential credential = new DefaultAzureCredentialBuilder() - .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) - .build(); -ContainerRegistryManager manager = ContainerRegistryManager - .authenticate(credential, profile); -``` - -The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. - -See [Authentication][authenticate] for more options. - -## Key concepts - -See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. - -## Examples - -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md) - - -## Troubleshooting - -## Next steps - -## Contributing - -For details on contributing to this repository, see the [contributing guide][cg]. - -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. - - -[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS -[docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ -[azure_subscription]: https://azure.microsoft.com/free/ -[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity -[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials -[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty -[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md -[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md -[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md -[coc]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md deleted file mode 100644 index de89995aca75..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/SAMPLE.md +++ /dev/null @@ -1,1838 +0,0 @@ -# Code snippets and samples - - -## CacheRules - -- [Create](#cacherules_create) -- [Delete](#cacherules_delete) -- [Get](#cacherules_get) -- [List](#cacherules_list) -- [Update](#cacherules_update) - -## ConnectedRegistries - -- [Create](#connectedregistries_create) -- [Deactivate](#connectedregistries_deactivate) -- [Delete](#connectedregistries_delete) -- [Get](#connectedregistries_get) -- [List](#connectedregistries_list) -- [Update](#connectedregistries_update) - -## CredentialSets - -- [Create](#credentialsets_create) -- [Delete](#credentialsets_delete) -- [Get](#credentialsets_get) -- [List](#credentialsets_list) -- [Update](#credentialsets_update) - -## Operations - -- [List](#operations_list) - -## PrivateEndpointConnections - -- [CreateOrUpdate](#privateendpointconnections_createorupdate) -- [Delete](#privateendpointconnections_delete) -- [Get](#privateendpointconnections_get) -- [List](#privateendpointconnections_list) - -## Registries - -- [CheckNameAvailability](#registries_checknameavailability) -- [Create](#registries_create) -- [Delete](#registries_delete) -- [GenerateCredentials](#registries_generatecredentials) -- [GetByResourceGroup](#registries_getbyresourcegroup) -- [GetPrivateLinkResource](#registries_getprivatelinkresource) -- [ImportImage](#registries_importimage) -- [List](#registries_list) -- [ListByResourceGroup](#registries_listbyresourcegroup) -- [ListCredentials](#registries_listcredentials) -- [ListPrivateLinkResources](#registries_listprivatelinkresources) -- [ListUsages](#registries_listusages) -- [RegenerateCredential](#registries_regeneratecredential) -- [Update](#registries_update) - -## Replications - -- [Create](#replications_create) -- [Delete](#replications_delete) -- [Get](#replications_get) -- [List](#replications_list) -- [Update](#replications_update) - -## ScopeMaps - -- [Create](#scopemaps_create) -- [Delete](#scopemaps_delete) -- [Get](#scopemaps_get) -- [List](#scopemaps_list) -- [Update](#scopemaps_update) - -## Tokens - -- [Create](#tokens_create) -- [Delete](#tokens_delete) -- [Get](#tokens_get) -- [List](#tokens_list) -- [Update](#tokens_update) - -## Webhooks - -- [Create](#webhooks_create) -- [Delete](#webhooks_delete) -- [Get](#webhooks_get) -- [GetCallbackConfig](#webhooks_getcallbackconfig) -- [List](#webhooks_list) -- [ListEvents](#webhooks_listevents) -- [Ping](#webhooks_ping) -- [Update](#webhooks_update) -### CacheRules_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; - -/** - * Samples for CacheRules Create. - */ -public final class CacheRulesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleCreate.json - */ - /** - * Sample code: CacheRuleCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules() - .define("myCacheRule") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new CacheRuleProperties().withCredentialSetResourceId("fakeTokenPlaceholder") - .withSourceRepository("docker.io/library/hello-world") - .withTargetRepository("cached-docker-hub/hello-world")) - .create(); - } -} -``` - -### CacheRules_Delete - -```java -/** - * Samples for CacheRules Delete. - */ -public final class CacheRulesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleDelete.json - */ - /** - * Sample code: CacheRuleDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules().delete("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); - } -} -``` - -### CacheRules_Get - -```java -/** - * Samples for CacheRules Get. - */ -public final class CacheRulesGetSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleGet.json - */ - /** - * Sample code: CacheRuleGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules() - .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); - } -} -``` - -### CacheRules_List - -```java -/** - * Samples for CacheRules List. - */ -public final class CacheRulesListSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleList.json - */ - /** - * Sample code: CacheRuleList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### CacheRules_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; - -/** - * Samples for CacheRules Update. - */ -public final class CacheRulesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json - */ - /** - * Sample code: CacheRuleUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - CacheRule resource = manager.cacheRules() - .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withCredentialSetResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2") - .apply(); - } -} -``` - -### ConnectedRegistries_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ParentProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncProperties; -import java.time.Duration; -import java.util.Arrays; - -/** - * Samples for ConnectedRegistries Create. - */ -public final class ConnectedRegistriesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json - */ - /** - * Sample code: ConnectedRegistryCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryCreate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .define("myConnectedRegistry") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new ConnectedRegistryProperties().withMode(ConnectedRegistryMode.READ_WRITE) - .withParent( - new ParentProperties().withSyncProperties(new SyncProperties().withTokenId("fakeTokenPlaceholder") - .withSchedule("0 9 * * *") - .withSyncWindow(Duration.parse("PT3H")) - .withMessageTtl(Duration.parse("P2D")))) - .withClientTokenIds(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token")) - .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) - .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *"))) - .create(); - } -} -``` - -### ConnectedRegistries_Deactivate - -```java -/** - * Samples for ConnectedRegistries Deactivate. - */ -public final class ConnectedRegistriesDeactivateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json - */ - /** - * Sample code: ConnectedRegistryDeactivate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryDeactivate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .deactivate("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedRegistries_Delete - -```java -/** - * Samples for ConnectedRegistries Delete. - */ -public final class ConnectedRegistriesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json - */ - /** - * Sample code: ConnectedRegistryDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryDelete( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .delete("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedRegistries_Get - -```java -/** - * Samples for ConnectedRegistries Get. - */ -public final class ConnectedRegistriesGetSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json - */ - /** - * Sample code: ConnectedRegistryGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - connectedRegistryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .getWithResponse("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedRegistries_List - -```java -/** - * Samples for ConnectedRegistries List. - */ -public final class ConnectedRegistriesListSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json - */ - /** - * Sample code: ConnectedRegistryList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - connectedRegistryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries().list("myResourceGroup", "myRegistry", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedRegistries_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; -import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; -import java.time.Duration; -import java.util.Arrays; - -/** - * Samples for ConnectedRegistries Update. - */ -public final class ConnectedRegistriesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json - */ - /** - * Sample code: ConnectedRegistryUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryUpdate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - ConnectedRegistry resource = manager.connectedRegistries() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withSyncProperties(new SyncUpdateProperties().withSchedule("0 0 */10 * *") - .withSyncWindow(Duration.parse("P2D")) - .withMessageTtl(Duration.parse("P30D"))) - .withLogging( - new LoggingProperties().withLogLevel(LogLevel.DEBUG).withAuditLogStatus(AuditLogStatus.ENABLED)) - .withClientTokenIds(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token")) - .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) - .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *")) - .apply(); - } -} -``` - -### CredentialSets_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; -import java.util.Arrays; - -/** - * Samples for CredentialSets Create. - */ -public final class CredentialSetsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetCreate.json - */ - /** - * Sample code: CredentialSetCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .define("myCredentialSet") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new CredentialSetProperties().withLoginServer("docker.io") - .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) - .withUsernameSecretIdentifier("fakeTokenPlaceholder") - .withPasswordSecretIdentifier("fakeTokenPlaceholder")))) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .create(); - } -} -``` - -### CredentialSets_Delete - -```java -/** - * Samples for CredentialSets Delete. - */ -public final class CredentialSetsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetDelete.json - */ - /** - * Sample code: CredentialSetDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .delete("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); - } -} -``` - -### CredentialSets_Get - -```java -/** - * Samples for CredentialSets Get. - */ -public final class CredentialSetsGetSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetGet.json - */ - /** - * Sample code: CredentialSetGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); - } -} -``` - -### CredentialSets_List - -```java -/** - * Samples for CredentialSets List. - */ -public final class CredentialSetsListSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetList.json - */ - /** - * Sample code: CredentialSetList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### CredentialSets_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; -import java.util.Arrays; - -/** - * Samples for CredentialSets Update. - */ -public final class CredentialSetsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json - */ - /** - * Sample code: CredentialSetUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - CredentialSet resource = manager.credentialSets() - .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) - .withUsernameSecretIdentifier("fakeTokenPlaceholder") - .withPasswordSecretIdentifier("fakeTokenPlaceholder"))) - .apply(); - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-11-01/OperationList.json - */ - /** - * Sample code: OperationList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - operationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateEndpointConnections_CreateOrUpdate - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; - -/** - * Samples for PrivateEndpointConnections CreateOrUpdate. - */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json - */ - /** - * Sample code: PrivateEndpointConnectionCreateOrUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionCreateOrUpdate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .define("myConnection") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("Auto-Approved"))) - .create(); - } -} -``` - -### PrivateEndpointConnections_Delete - -```java -/** - * Samples for PrivateEndpointConnections Delete. - */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json - */ - /** - * Sample code: PrivateEndpointConnectionDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionDelete( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .delete("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateEndpointConnections_Get - -```java -/** - * Samples for PrivateEndpointConnections Get. - */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json - */ - /** - * Sample code: PrivateEndpointConnectionGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionGet( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .getWithResponse("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateEndpointConnections_List - -```java -/** - * Samples for PrivateEndpointConnections List. - */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json - */ - /** - * Sample code: PrivateEndpointConnectionList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionList( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_CheckNameAvailability - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; - -/** - * Samples for Registries CheckNameAvailability. - */ -public final class RegistriesCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json - */ - /** - * Sample code: RegistryCheckNameAvailable. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCheckNameAvailable( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json - */ - /** - * Sample code: RegistryCheckNameNotAvailable. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCheckNameNotAvailable( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), - com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import com.azure.resourcemanager.containerregistry.generated.models.SkuName; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries Create. - */ -public final class RegistriesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json - */ - /** - * Sample code: RegistryCreateAbac. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryCreateAbac(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties( - new RegistryProperties().withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS)) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json - */ - /** - * Sample code: RegistryCreateZoneRedundant. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCreateZoneRedundant( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new RegistryProperties().withZoneRedundancy(ZoneRedundancy.ENABLED)) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCreate.json - */ - /** - * Sample code: RegistryCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new RegistryProperties().withAdminUserEnabled(true)) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### Registries_Delete - -```java -/** - * Samples for Registries Delete. - */ -public final class RegistriesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryDelete.json - */ - /** - * Sample code: RegistryDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().delete("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_GenerateCredentials - -```java -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import java.time.OffsetDateTime; - -/** - * Samples for Registries GenerateCredentials. - */ -public final class RegistriesGenerateCredentialsSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json - */ - /** - * Sample code: RegistryGenerateCredentials. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryGenerateCredentials( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .generateCredentials("myResourceGroup", "myRegistry", - new GenerateCredentialsParameters().withTokenId("fakeTokenPlaceholder") - .withExpiry(OffsetDateTime.parse("2020-12-31T15:59:59.0707808Z")), - com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_GetByResourceGroup - -```java -/** - * Samples for Registries GetByResourceGroup. - */ -public final class RegistriesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGet.json - */ - /** - * Sample code: RegistryGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_GetPrivateLinkResource - -```java -/** - * Samples for Registries GetPrivateLinkResource. - */ -public final class RegistriesGetPrivateLinkResourceSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json - */ - /** - * Sample code: RegistryGetPrivateLinkResource. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryGetPrivateLinkResource( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .getPrivateLinkResourceWithResponse("myResourceGroup", "myRegistry", "registry", - com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_ImportImage - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.ImportMode; -import com.azure.resourcemanager.containerregistry.generated.models.ImportSource; -import java.util.Arrays; - -/** - * Samples for Registries ImportImage. - */ -public final class RegistriesImportImageSamples { - /* - * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json - */ - /** - * Sample code: ImportImageFromPublicRegistry. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void importImageFromPublicRegistry( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters() - .withSource(new ImportSource().withRegistryUri("registry.hub.docker.com") - .withSourceImage("library/hello-world")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/ImportImageByTag.json - */ - /** - * Sample code: ImportImageByTag. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - importImageByTag(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters().withSource(new ImportSource().withResourceId( - "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") - .withSourceImage("sourceRepository:sourceTag")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json - */ - /** - * Sample code: ImportImageByManifestDigest. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void importImageByManifestDigest( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters().withSource(new ImportSource().withResourceId( - "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") - .withSourceImage( - "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_List - -```java -/** - * Samples for Registries List. - */ -public final class RegistriesListSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryList.json - */ - /** - * Sample code: RegistryList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_ListByResourceGroup - -```java -/** - * Samples for Registries ListByResourceGroup. - */ -public final class RegistriesListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json - */ - /** - * Sample code: RegistryListByResourceGroup. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListByResourceGroup( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_ListCredentials - -```java -/** - * Samples for Registries ListCredentials. - */ -public final class RegistriesListCredentialsSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListCredentials.json - */ - /** - * Sample code: RegistryListCredentials. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListCredentials( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .listCredentialsWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_ListPrivateLinkResources - -```java -/** - * Samples for Registries ListPrivateLinkResources. - */ -public final class RegistriesListPrivateLinkResourcesSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json - */ - /** - * Sample code: RegistryListPrivateLinkResources. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListPrivateLinkResources( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .listPrivateLinkResources("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_ListUsages - -```java -/** - * Samples for Registries ListUsages. - */ -public final class RegistriesListUsagesSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListUsages.json - */ - /** - * Sample code: RegistryListUsages. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryListUsages(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().listUsagesWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_RegenerateCredential - -```java -import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; - -/** - * Samples for Registries RegenerateCredential. - */ -public final class RegistriesRegenerateCredentialSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json - */ - /** - * Sample code: RegistryRegenerateCredential. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryRegenerateCredential( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .regenerateCredentialWithResponse("myResourceGroup", "myRegistry", - new RegenerateCredentialParameters().withName(PasswordName.PASSWORD), com.azure.core.util.Context.NONE); - } -} -``` - -### Registries_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.Registry; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import com.azure.resourcemanager.containerregistry.generated.models.SkuName; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries Update. - */ -public final class RegistriesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryUpdate.json - */ - /** - * Sample code: RegistryUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withSku(new Sku().withName(SkuName.STANDARD)) - .withAdminUserEnabled(true) - .withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS) - .apply(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### Replications_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Replications Create. - */ -public final class ReplicationsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationCreate.json - */ - /** - * Sample code: ReplicationCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .define("myReplication") - .withRegion("eastus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json - */ - /** - * Sample code: ReplicationCreateZoneRedundant. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void replicationCreateZoneRedundant( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .define("myReplication") - .withRegion("eastus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties( - new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### Replications_Delete - -```java -/** - * Samples for Replications Delete. - */ -public final class ReplicationsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationDelete.json - */ - /** - * Sample code: ReplicationDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .delete("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); - } -} -``` - -### Replications_Get - -```java -/** - * Samples for Replications Get. - */ -public final class ReplicationsGetSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationGet.json - */ - /** - * Sample code: ReplicationGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); - } -} -``` - -### Replications_List - -```java -/** - * Samples for Replications List. - */ -public final class ReplicationsListSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationList.json - */ - /** - * Sample code: ReplicationList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Replications_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Replications Update. - */ -public final class ReplicationsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationUpdate.json - */ - /** - * Sample code: ReplicationUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Replication resource = manager.replications() - .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### ScopeMaps_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.util.Arrays; - -/** - * Samples for ScopeMaps Create. - */ -public final class ScopeMapsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapCreate.json - */ - /** - * Sample code: ScopeMapCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps() - .define("myScopeMap") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new ScopeMapProperties().withDescription("Developer Scopes") - .withActions( - Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/delete"))) - .create(); - } -} -``` - -### ScopeMaps_Delete - -```java -/** - * Samples for ScopeMaps Delete. - */ -public final class ScopeMapsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapDelete.json - */ - /** - * Sample code: ScopeMapDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps().delete("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); - } -} -``` - -### ScopeMaps_Get - -```java -/** - * Samples for ScopeMaps Get. - */ -public final class ScopeMapsGetSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapGet.json - */ - /** - * Sample code: ScopeMapGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); - } -} -``` - -### ScopeMaps_List - -```java -/** - * Samples for ScopeMaps List. - */ -public final class ScopeMapsListSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapList.json - */ - /** - * Sample code: ScopeMapList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### ScopeMaps_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import java.util.Arrays; - -/** - * Samples for ScopeMaps Update. - */ -public final class ScopeMapsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json - */ - /** - * Sample code: ScopeMapUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - ScopeMap resource = manager.scopeMaps() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDescription("Developer Scopes") - .withActions( - Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/contentRead")) - .apply(); - } -} -``` - -### Tokens_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; -import java.util.Arrays; - -/** - * Samples for Tokens Create. - */ -public final class TokensCreateSamples { - /* - * x-ms-original-file: 2025-11-01/TokenCreate.json - */ - /** - * Sample code: TokenCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens() - .define("myToken") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new TokenProperties().withScopeMapId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap") - .withCredentials(new TokenCredentialsProperties() - .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) - .withEncodedPemCertificate("fakeTokenPlaceholder")))) - .withStatus(TokenStatus.DISABLED)) - .create(); - } -} -``` - -### Tokens_Delete - -```java -/** - * Samples for Tokens Delete. - */ -public final class TokensDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/TokenDelete.json - */ - /** - * Sample code: TokenDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().delete("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); - } -} -``` - -### Tokens_Get - -```java -/** - * Samples for Tokens Get. - */ -public final class TokensGetSamples { - /* - * x-ms-original-file: 2025-11-01/TokenGet.json - */ - /** - * Sample code: TokenGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); - } -} -``` - -### Tokens_List - -```java -/** - * Samples for Tokens List. - */ -public final class TokensListSamples { - /* - * x-ms-original-file: 2025-11-01/TokenList.json - */ - /** - * Sample code: TokenList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Tokens_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.Token; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import java.util.Arrays; - -/** - * Samples for Tokens Update. - */ -public final class TokensUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/TokenUpdate.json - */ - /** - * Sample code: TokenUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Token resource = manager.tokens() - .getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withScopeMapId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap") - .withCredentials(new TokenCredentialsProperties() - .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) - .withEncodedPemCertificate("fakeTokenPlaceholder")))) - .apply(); - } -} -``` - -### Webhooks_Create - -```java -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Webhooks Create. - */ -public final class WebhooksCreateSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookCreate.json - */ - /** - * Sample code: WebhookCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .define("myWebhook") - .withRegion("westus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withServiceUri("http://myservice.com") - .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) - .withStatus(WebhookStatus.ENABLED) - .withScope("myRepository") - .withActions(Arrays.asList(WebhookAction.PUSH)) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### Webhooks_Delete - -```java -/** - * Samples for Webhooks Delete. - */ -public final class WebhooksDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookDelete.json - */ - /** - * Sample code: WebhookDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().delete("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_Get - -```java -/** - * Samples for Webhooks Get. - */ -public final class WebhooksGetSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookGet.json - */ - /** - * Sample code: WebhookGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_GetCallbackConfig - -```java -/** - * Samples for Webhooks GetCallbackConfig. - */ -public final class WebhooksGetCallbackConfigSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json - */ - /** - * Sample code: WebhookGetCallbackConfig. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void webhookGetCallbackConfig( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .getCallbackConfigWithResponse("myResourceGroup", "myRegistry", "myWebhook", - com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_List - -```java -/** - * Samples for Webhooks List. - */ -public final class WebhooksListSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookList.json - */ - /** - * Sample code: WebhookList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_ListEvents - -```java -/** - * Samples for Webhooks ListEvents. - */ -public final class WebhooksListEventsSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookListEvents.json - */ - /** - * Sample code: WebhookListEvents. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookListEvents(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().listEvents("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_Ping - -```java -/** - * Samples for Webhooks Ping. - */ -public final class WebhooksPingSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookPing.json - */ - /** - * Sample code: WebhookPing. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookPing(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .pingWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} -``` - -### Webhooks_Update - -```java -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Webhooks Update. - */ -public final class WebhooksUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookUpdate.json - */ - /** - * Sample code: WebhookUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Webhook resource = manager.webhooks() - .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withServiceUri("http://myservice.com") - .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) - .withStatus(WebhookStatus.ENABLED) - .withScope("myRepository") - .withActions(Arrays.asList(WebhookAction.PUSH)) - .apply(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml deleted file mode 100644 index 98db8e7bd96e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-containerregistry-generated - 1.0.0 - jar - - Microsoft Azure SDK for ContainerRegistry Management - This package contains Microsoft Azure SDK for ContainerRegistry Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components. Package api-version 2025-11-01. - https://github.com/Azure/azure-sdk-for-java - - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - 0 - 0 - - - - com.azure - azure-core - 1.57.1 - - - com.azure - azure-core-management - 1.19.3 - - - com.azure - azure-core-test - 1.27.0-beta.14 - test - - - com.azure - azure-identity - 1.18.1 - test - - - diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java deleted file mode 100644 index 742742a97687..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient; -import com.azure.resourcemanager.containerregistry.generated.implementation.CacheRulesImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.ConnectedRegistriesImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder; -import com.azure.resourcemanager.containerregistry.generated.implementation.CredentialSetsImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.OperationsImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.PrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.RegistriesImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.ReplicationsImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.ScopeMapsImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.TokensImpl; -import com.azure.resourcemanager.containerregistry.generated.implementation.WebhooksImpl; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRules; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistries; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSets; -import com.azure.resourcemanager.containerregistry.generated.models.Operations; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnections; -import com.azure.resourcemanager.containerregistry.generated.models.Registries; -import com.azure.resourcemanager.containerregistry.generated.models.Replications; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMaps; -import com.azure.resourcemanager.containerregistry.generated.models.Tokens; -import com.azure.resourcemanager.containerregistry.generated.models.Webhooks; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to ContainerRegistryManager. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -public final class ContainerRegistryManager { - private Operations operations; - - private Registries registries; - - private CacheRules cacheRules; - - private CredentialSets credentialSets; - - private ConnectedRegistries connectedRegistries; - - private PrivateEndpointConnections privateEndpointConnections; - - private Replications replications; - - private ScopeMaps scopeMaps; - - private Tokens tokens; - - private Webhooks webhooks; - - private final ContainerRegistryManagementClient clientObject; - - private ContainerRegistryManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new ContainerRegistryManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of ContainerRegistry service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerRegistry service API instance. - */ - public static ContainerRegistryManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of ContainerRegistry service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the ContainerRegistry service API instance. - */ - public static ContainerRegistryManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ContainerRegistryManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create ContainerRegistryManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new ContainerRegistryManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-containerregistry-generated.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of ContainerRegistry service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerRegistry service API instance. - */ - public ContainerRegistryManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.containerregistry.generated") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new ContainerRegistryManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Registries. It manages Registry. - * - * @return Resource collection API of Registries. - */ - public Registries registries() { - if (this.registries == null) { - this.registries = new RegistriesImpl(clientObject.getRegistries(), this); - } - return registries; - } - - /** - * Gets the resource collection API of CacheRules. It manages CacheRule. - * - * @return Resource collection API of CacheRules. - */ - public CacheRules cacheRules() { - if (this.cacheRules == null) { - this.cacheRules = new CacheRulesImpl(clientObject.getCacheRules(), this); - } - return cacheRules; - } - - /** - * Gets the resource collection API of CredentialSets. It manages CredentialSet. - * - * @return Resource collection API of CredentialSets. - */ - public CredentialSets credentialSets() { - if (this.credentialSets == null) { - this.credentialSets = new CredentialSetsImpl(clientObject.getCredentialSets(), this); - } - return credentialSets; - } - - /** - * Gets the resource collection API of ConnectedRegistries. It manages ConnectedRegistry. - * - * @return Resource collection API of ConnectedRegistries. - */ - public ConnectedRegistries connectedRegistries() { - if (this.connectedRegistries == null) { - this.connectedRegistries = new ConnectedRegistriesImpl(clientObject.getConnectedRegistries(), this); - } - return connectedRegistries; - } - - /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * - * @return Resource collection API of PrivateEndpointConnections. - */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** - * Gets the resource collection API of Replications. It manages Replication. - * - * @return Resource collection API of Replications. - */ - public Replications replications() { - if (this.replications == null) { - this.replications = new ReplicationsImpl(clientObject.getReplications(), this); - } - return replications; - } - - /** - * Gets the resource collection API of ScopeMaps. It manages ScopeMap. - * - * @return Resource collection API of ScopeMaps. - */ - public ScopeMaps scopeMaps() { - if (this.scopeMaps == null) { - this.scopeMaps = new ScopeMapsImpl(clientObject.getScopeMaps(), this); - } - return scopeMaps; - } - - /** - * Gets the resource collection API of Tokens. It manages Token. - * - * @return Resource collection API of Tokens. - */ - public Tokens tokens() { - if (this.tokens == null) { - this.tokens = new TokensImpl(clientObject.getTokens(), this); - } - return tokens; - } - - /** - * Gets the resource collection API of Webhooks. It manages Webhook. - * - * @return Resource collection API of Webhooks. - */ - public Webhooks webhooks() { - if (this.webhooks == null) { - this.webhooks = new WebhooksImpl(clientObject.getWebhooks(), this); - } - return webhooks; - } - - /** - * Gets wrapped service client ContainerRegistryManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client ContainerRegistryManagementClient. - */ - public ContainerRegistryManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java deleted file mode 100644 index ab2a18209de1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CacheRuleInner; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in CacheRulesClient. - */ -public interface CacheRulesClient { - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, - Context context); - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName); - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context); - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters); - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters, Context context); - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters); - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters); - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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> beginDelete(String resourceGroupName, String registryName, String cacheRuleName); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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> beginDelete(String resourceGroupName, String registryName, String cacheRuleName, - Context context); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 registryName, String cacheRuleName); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java deleted file mode 100644 index acece2d185ee..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in ConnectedRegistriesClient. - */ -public interface ConnectedRegistriesClient { - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String connectedRegistryName, Context context); - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedRegistryInner get(String resourceGroupName, String registryName, String connectedRegistryName); - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, - String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters); - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, - String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, - Context context); - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters); - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters, Context context); - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, - String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters); - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, - String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context); - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters); - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDelete(String resourceGroupName, String registryName, - String connectedRegistryName); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDelete(String resourceGroupName, String registryName, - String connectedRegistryName, Context context); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 registryName, String connectedRegistryName); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDeactivate(String resourceGroupName, String registryName, - String connectedRegistryName); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDeactivate(String resourceGroupName, String registryName, - String connectedRegistryName, Context context); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java deleted file mode 100644 index 4c8b76ba8d04..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for ContainerRegistryManagementClient class. - */ -public interface ContainerRegistryManagementClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the RegistriesClient object to access its operations. - * - * @return the RegistriesClient object. - */ - RegistriesClient getRegistries(); - - /** - * Gets the CacheRulesClient object to access its operations. - * - * @return the CacheRulesClient object. - */ - CacheRulesClient getCacheRules(); - - /** - * Gets the CredentialSetsClient object to access its operations. - * - * @return the CredentialSetsClient object. - */ - CredentialSetsClient getCredentialSets(); - - /** - * Gets the ConnectedRegistriesClient object to access its operations. - * - * @return the ConnectedRegistriesClient object. - */ - ConnectedRegistriesClient getConnectedRegistries(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the ReplicationsClient object to access its operations. - * - * @return the ReplicationsClient object. - */ - ReplicationsClient getReplications(); - - /** - * Gets the ScopeMapsClient object to access its operations. - * - * @return the ScopeMapsClient object. - */ - ScopeMapsClient getScopeMaps(); - - /** - * Gets the TokensClient object to access its operations. - * - * @return the TokensClient object. - */ - TokensClient getTokens(); - - /** - * Gets the WebhooksClient object to access its operations. - * - * @return the WebhooksClient object. - */ - WebhooksClient getWebhooks(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java deleted file mode 100644 index 9e929bac6bf9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CredentialSetInner; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in CredentialSetsClient. - */ -public interface CredentialSetsClient { - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String credentialSetName, Context context); - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName); - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters); - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, - Context context); - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetInner credentialSetCreateParameters); - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetInner credentialSetCreateParameters, Context context); - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters); - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, - Context context); - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetUpdateParameters credentialSetUpdateParameters); - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetUpdateParameters credentialSetUpdateParameters, Context context); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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> beginDelete(String resourceGroupName, String registryName, - String credentialSetName); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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> beginDelete(String resourceGroupName, String registryName, - String credentialSetName, Context context); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 registryName, String credentialSetName); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java deleted file mode 100644 index d6cf0a6aef5f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index 0a05b60605ca..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. - */ -public interface PrivateEndpointConnectionsClient { - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context); - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String registryName, - String privateEndpointConnectionName); - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection); - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection, Context context); - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection); - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, - Context context); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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> beginDelete(String resourceGroupName, String registryName, - String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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> beginDelete(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 registryName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, Context context); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java deleted file mode 100644 index e4123f71cb9c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java +++ /dev/null @@ -1,577 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in RegistriesClient. - */ -public interface RegistriesClient { - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context); - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner getByResourceGroup(String resourceGroupName, String registryName); - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreate(String resourceGroupName, String registryName, - RegistryInner registry); - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreate(String resourceGroupName, String registryName, - RegistryInner registry, Context context); - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry); - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry, Context context); - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters); - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters, Context context); - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner update(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters); - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner update(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters, Context context); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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> beginDelete(String resourceGroupName, String registryName); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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> beginDelete(String resourceGroupName, String registryName, Context context); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 registryName); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 delete(String resourceGroupName, String registryName, Context context); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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> beginImportImage(String resourceGroupName, String registryName, - ImportImageParameters parameters); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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> beginImportImage(String resourceGroupName, String registryName, - ImportImageParameters parameters, Context context); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, Context context); - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context); - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName); - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 response from the ListCredentials operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listCredentialsWithResponse(String resourceGroupName, - String registryName, Context context); - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 response from the ListCredentials operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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, GenerateCredentialsResultInner> beginGenerateCredentials( - String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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, GenerateCredentialsResultInner> beginGenerateCredentials( - String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters, - Context context); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response - checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getPrivateLinkResourceWithResponse(String resourceGroupName, String registryName, - String groupName, Context context); - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, String registryName, String groupName); - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, - Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java deleted file mode 100644 index 999bc50c56a2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in ReplicationsClient. - */ -public interface ReplicationsClient { - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String replicationName, - Context context); - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationInner get(String resourceGroupName, String registryName, String replicationName); - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication); - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication, Context context); - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationInner create(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication); - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationInner create(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication, Context context); - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters); - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, - Context context); - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationInner update(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters); - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationInner update(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters, Context context); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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> beginDelete(String resourceGroupName, String registryName, - String replicationName); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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> beginDelete(String resourceGroupName, String registryName, - String replicationName, Context context); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 registryName, String replicationName); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java deleted file mode 100644 index 718aef322eca..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in ScopeMapsClient. - */ -public interface ScopeMapsClient { - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, - Context context); - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScopeMapInner get(String resourceGroupName, String registryName, String scopeMapName); - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapInner scopeMapCreateParameters); - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context); - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters); - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters, Context context); - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters); - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters); - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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> beginDelete(String resourceGroupName, String registryName, String scopeMapName); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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> beginDelete(String resourceGroupName, String registryName, String scopeMapName, - Context context); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 registryName, String scopeMapName); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java deleted file mode 100644 index f00d83f1bb28..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.TokenInner; -import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in TokensClient. - */ -public interface TokensClient { - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String tokenName, - Context context); - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TokenInner get(String resourceGroupName, String registryName, String tokenName); - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters); - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters, Context context); - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TokenInner create(String resourceGroupName, String registryName, String tokenName, - TokenInner tokenCreateParameters); - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TokenInner create(String resourceGroupName, String registryName, String tokenName, TokenInner tokenCreateParameters, - Context context); - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters); - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context); - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TokenInner update(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters); - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TokenInner update(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters, Context context); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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> beginDelete(String resourceGroupName, String registryName, String tokenName); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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> beginDelete(String resourceGroupName, String registryName, String tokenName, - Context context); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 registryName, String tokenName); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java deleted file mode 100644 index b7b3e1147c46..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.models.CallbackConfigInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in WebhooksClient. - */ -public interface WebhooksClient { - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebhookInner get(String resourceGroupName, String registryName, String webhookName); - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters); - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters, Context context); - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebhookInner create(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters); - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebhookInner create(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters, Context context); - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters); - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context); - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebhookInner update(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters); - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebhookInner update(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters, Context context); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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> beginDelete(String resourceGroupName, String registryName, String webhookName); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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> beginDelete(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 registryName, String webhookName); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EventInfoInner ping(String resourceGroupName, String registryName, String webhookName); - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName); - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java deleted file mode 100644 index f387d2df4787..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; -import java.io.IOException; - -/** - * An object that represents a cache rule for a container registry. - */ -@Fluent -public final class CacheRuleInner extends ProxyResource { - /* - * The properties of the cache rule. - */ - private CacheRuleProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CacheRuleInner class. - */ - public CacheRuleInner() { - } - - /** - * Get the properties property: The properties of the cache rule. - * - * @return the properties value. - */ - public CacheRuleProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the cache rule. - * - * @param properties the properties value to set. - * @return the CacheRuleInner object itself. - */ - public CacheRuleInner withProperties(CacheRuleProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CacheRuleInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CacheRuleInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CacheRuleInner. - */ - public static CacheRuleInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CacheRuleInner deserializedCacheRuleInner = new CacheRuleInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCacheRuleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCacheRuleInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCacheRuleInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedCacheRuleInner.properties = CacheRuleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedCacheRuleInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCacheRuleInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java deleted file mode 100644 index 3e6974afdd6f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The parameters for updating cache rule properties. - */ -@Fluent -public final class CacheRuleUpdateProperties implements JsonSerializable { - /* - * The ARM resource ID of the credential store which is associated with the Cache rule. - */ - private String credentialSetResourceId; - - /** - * Creates an instance of CacheRuleUpdateProperties class. - */ - public CacheRuleUpdateProperties() { - } - - /** - * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the Cache rule. - * - * @return the credentialSetResourceId value. - */ - public String credentialSetResourceId() { - return this.credentialSetResourceId; - } - - /** - * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the Cache rule. - * - * @param credentialSetResourceId the credentialSetResourceId value to set. - * @return the CacheRuleUpdateProperties object itself. - */ - public CacheRuleUpdateProperties withCredentialSetResourceId(String credentialSetResourceId) { - this.credentialSetResourceId = credentialSetResourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialSetResourceId", this.credentialSetResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CacheRuleUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CacheRuleUpdateProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CacheRuleUpdateProperties. - */ - public static CacheRuleUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CacheRuleUpdateProperties deserializedCacheRuleUpdateProperties = new CacheRuleUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialSetResourceId".equals(fieldName)) { - deserializedCacheRuleUpdateProperties.credentialSetResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCacheRuleUpdateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java deleted file mode 100644 index 6d9432b5da0c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The configuration of service URI and custom headers for the webhook. - */ -@Immutable -public final class CallbackConfigInner implements JsonSerializable { - /* - * The service URI for the webhook to post notifications. - */ - private String serviceUri; - - /* - * Custom headers that will be added to the webhook notifications. - */ - private Map customHeaders; - - /** - * Creates an instance of CallbackConfigInner class. - */ - private CallbackConfigInner() { - } - - /** - * Get the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - public String serviceUri() { - return this.serviceUri; - } - - /** - * Get the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - public Map customHeaders() { - return this.customHeaders; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceUri", this.serviceUri); - jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CallbackConfigInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CallbackConfigInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CallbackConfigInner. - */ - public static CallbackConfigInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CallbackConfigInner deserializedCallbackConfigInner = new CallbackConfigInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceUri".equals(fieldName)) { - deserializedCallbackConfigInner.serviceUri = reader.getString(); - } else if ("customHeaders".equals(fieldName)) { - Map customHeaders = reader.readMap(reader1 -> reader1.getString()); - deserializedCallbackConfigInner.customHeaders = customHeaders; - } else { - reader.skipChildren(); - } - } - - return deserializedCallbackConfigInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java deleted file mode 100644 index 2252dfd24c2e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; -import java.io.IOException; - -/** - * An object that represents a connected registry for a container registry. - */ -@Fluent -public final class ConnectedRegistryInner extends ProxyResource { - /* - * The properties of the connected registry. - */ - private ConnectedRegistryProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ConnectedRegistryInner class. - */ - public ConnectedRegistryInner() { - } - - /** - * Get the properties property: The properties of the connected registry. - * - * @return the properties value. - */ - public ConnectedRegistryProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the connected registry. - * - * @param properties the properties value to set. - * @return the ConnectedRegistryInner object itself. - */ - public ConnectedRegistryInner withProperties(ConnectedRegistryProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedRegistryInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedRegistryInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConnectedRegistryInner. - */ - public static ConnectedRegistryInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedRegistryInner deserializedConnectedRegistryInner = new ConnectedRegistryInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedConnectedRegistryInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedConnectedRegistryInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedConnectedRegistryInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedConnectedRegistryInner.properties = ConnectedRegistryProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedConnectedRegistryInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedRegistryInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java deleted file mode 100644 index c2fa9b1074e9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; -import java.io.IOException; -import java.util.List; - -/** - * The parameters for updating token properties. - */ -@Fluent -public final class ConnectedRegistryUpdateProperties implements JsonSerializable { - /* - * The sync properties of the connected registry with its parent. - */ - private SyncUpdateProperties syncProperties; - - /* - * The logging properties of the connected registry. - */ - private LoggingProperties logging; - - /* - * The list of the ACR token resource IDs used to authenticate clients to the connected registry. - */ - private List clientTokenIds; - - /* - * The list of notifications subscription information for the connected registry. - */ - private List notificationsList; - - /* - * The garbage collection properties of the connected registry. - */ - private GarbageCollectionProperties garbageCollection; - - /** - * Creates an instance of ConnectedRegistryUpdateProperties class. - */ - public ConnectedRegistryUpdateProperties() { - } - - /** - * Get the syncProperties property: The sync properties of the connected registry with its parent. - * - * @return the syncProperties value. - */ - public SyncUpdateProperties syncProperties() { - return this.syncProperties; - } - - /** - * Set the syncProperties property: The sync properties of the connected registry with its parent. - * - * @param syncProperties the syncProperties value to set. - * @return the ConnectedRegistryUpdateProperties object itself. - */ - public ConnectedRegistryUpdateProperties withSyncProperties(SyncUpdateProperties syncProperties) { - this.syncProperties = syncProperties; - return this; - } - - /** - * Get the logging property: The logging properties of the connected registry. - * - * @return the logging value. - */ - public LoggingProperties logging() { - return this.logging; - } - - /** - * Set the logging property: The logging properties of the connected registry. - * - * @param logging the logging value to set. - * @return the ConnectedRegistryUpdateProperties object itself. - */ - public ConnectedRegistryUpdateProperties withLogging(LoggingProperties logging) { - this.logging = logging; - return this; - } - - /** - * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @return the clientTokenIds value. - */ - public List clientTokenIds() { - return this.clientTokenIds; - } - - /** - * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @param clientTokenIds the clientTokenIds value to set. - * @return the ConnectedRegistryUpdateProperties object itself. - */ - public ConnectedRegistryUpdateProperties withClientTokenIds(List clientTokenIds) { - this.clientTokenIds = clientTokenIds; - return this; - } - - /** - * Get the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @return the notificationsList value. - */ - public List notificationsList() { - return this.notificationsList; - } - - /** - * Set the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @param notificationsList the notificationsList value to set. - * @return the ConnectedRegistryUpdateProperties object itself. - */ - public ConnectedRegistryUpdateProperties withNotificationsList(List notificationsList) { - this.notificationsList = notificationsList; - return this; - } - - /** - * Get the garbageCollection property: The garbage collection properties of the connected registry. - * - * @return the garbageCollection value. - */ - public GarbageCollectionProperties garbageCollection() { - return this.garbageCollection; - } - - /** - * Set the garbageCollection property: The garbage collection properties of the connected registry. - * - * @param garbageCollection the garbageCollection value to set. - * @return the ConnectedRegistryUpdateProperties object itself. - */ - public ConnectedRegistryUpdateProperties withGarbageCollection(GarbageCollectionProperties garbageCollection) { - this.garbageCollection = garbageCollection; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("syncProperties", this.syncProperties); - jsonWriter.writeJsonField("logging", this.logging); - jsonWriter.writeArrayField("clientTokenIds", this.clientTokenIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("notificationsList", this.notificationsList, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("garbageCollection", this.garbageCollection); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedRegistryUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedRegistryUpdateProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedRegistryUpdateProperties. - */ - public static ConnectedRegistryUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedRegistryUpdateProperties deserializedConnectedRegistryUpdateProperties - = new ConnectedRegistryUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("syncProperties".equals(fieldName)) { - deserializedConnectedRegistryUpdateProperties.syncProperties - = SyncUpdateProperties.fromJson(reader); - } else if ("logging".equals(fieldName)) { - deserializedConnectedRegistryUpdateProperties.logging = LoggingProperties.fromJson(reader); - } else if ("clientTokenIds".equals(fieldName)) { - List clientTokenIds = reader.readArray(reader1 -> reader1.getString()); - deserializedConnectedRegistryUpdateProperties.clientTokenIds = clientTokenIds; - } else if ("notificationsList".equals(fieldName)) { - List notificationsList = reader.readArray(reader1 -> reader1.getString()); - deserializedConnectedRegistryUpdateProperties.notificationsList = notificationsList; - } else if ("garbageCollection".equals(fieldName)) { - deserializedConnectedRegistryUpdateProperties.garbageCollection - = GarbageCollectionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedRegistryUpdateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java deleted file mode 100644 index 8ae85aa3671e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import java.io.IOException; - -/** - * An object that represents a credential set resource for a container registry. - */ -@Fluent -public final class CredentialSetInner extends ProxyResource { - /* - * The properties of the credential set. - */ - private CredentialSetProperties properties; - - /* - * Identities associated with the resource. This is used to access the KeyVault secrets. - */ - private IdentityProperties identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CredentialSetInner class. - */ - public CredentialSetInner() { - } - - /** - * Get the properties property: The properties of the credential set. - * - * @return the properties value. - */ - public CredentialSetProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the credential set. - * - * @param properties the properties value to set. - * @return the CredentialSetInner object itself. - */ - public CredentialSetInner withProperties(CredentialSetProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. - * - * @return the identity value. - */ - public IdentityProperties identity() { - return this.identity; - } - - /** - * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. - * - * @param identity the identity value to set. - * @return the CredentialSetInner object itself. - */ - public CredentialSetInner withIdentity(IdentityProperties identity) { - this.identity = identity; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialSetInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialSetInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CredentialSetInner. - */ - public static CredentialSetInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialSetInner deserializedCredentialSetInner = new CredentialSetInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCredentialSetInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCredentialSetInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCredentialSetInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedCredentialSetInner.properties = CredentialSetProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedCredentialSetInner.identity = IdentityProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedCredentialSetInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialSetInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java deleted file mode 100644 index 849a0834bbba..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import java.io.IOException; -import java.util.List; - -/** - * The parameters for updating credential set properties. - */ -@Fluent -public final class CredentialSetUpdateProperties implements JsonSerializable { - /* - * List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - */ - private List authCredentials; - - /** - * Creates an instance of CredentialSetUpdateProperties class. - */ - public CredentialSetUpdateProperties() { - } - - /** - * Get the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @return the authCredentials value. - */ - public List authCredentials() { - return this.authCredentials; - } - - /** - * Set the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @param authCredentials the authCredentials value to set. - * @return the CredentialSetUpdateProperties object itself. - */ - public CredentialSetUpdateProperties withAuthCredentials(List authCredentials) { - this.authCredentials = authCredentials; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("authCredentials", this.authCredentials, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialSetUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialSetUpdateProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialSetUpdateProperties. - */ - public static CredentialSetUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialSetUpdateProperties deserializedCredentialSetUpdateProperties - = new CredentialSetUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authCredentials".equals(fieldName)) { - List authCredentials - = reader.readArray(reader1 -> AuthCredential.fromJson(reader1)); - deserializedCredentialSetUpdateProperties.authCredentials = authCredentials; - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialSetUpdateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java deleted file mode 100644 index 59132f1e6d11..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The basic information of an event. - */ -@Immutable -public class EventInfoInner implements JsonSerializable { - /* - * The event ID. - */ - private String id; - - /** - * Creates an instance of EventInfoInner class. - */ - protected EventInfoInner() { - } - - /** - * Get the id property: The event ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The event ID. - * - * @param id the id value to set. - * @return the EventInfoInner object itself. - */ - EventInfoInner withId(String id) { - this.id = id; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventInfoInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventInfoInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventInfoInner. - */ - public static EventInfoInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventInfoInner deserializedEventInfoInner = new EventInfoInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEventInfoInner.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventInfoInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java deleted file mode 100644 index 0cf729512e6a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; -import com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage; -import java.io.IOException; - -/** - * The event for a webhook. - */ -@Immutable -public final class EventInner extends EventInfoInner { - /* - * The event request message sent to the service URI. - */ - private EventRequestMessage eventRequestMessage; - - /* - * The event response message received from the service URI. - */ - private EventResponseMessage eventResponseMessage; - - /* - * The event ID. - */ - private String id; - - /** - * Creates an instance of EventInner class. - */ - private EventInner() { - } - - /** - * Get the eventRequestMessage property: The event request message sent to the service URI. - * - * @return the eventRequestMessage value. - */ - public EventRequestMessage eventRequestMessage() { - return this.eventRequestMessage; - } - - /** - * Get the eventResponseMessage property: The event response message received from the service URI. - * - * @return the eventResponseMessage value. - */ - public EventResponseMessage eventResponseMessage() { - return this.eventResponseMessage; - } - - /** - * Get the id property: The event ID. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeJsonField("eventRequestMessage", this.eventRequestMessage); - jsonWriter.writeJsonField("eventResponseMessage", this.eventResponseMessage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the EventInner. - */ - public static EventInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventInner deserializedEventInner = new EventInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEventInner.id = reader.getString(); - } else if ("eventRequestMessage".equals(fieldName)) { - deserializedEventInner.eventRequestMessage = EventRequestMessage.fromJson(reader); - } else if ("eventResponseMessage".equals(fieldName)) { - deserializedEventInner.eventResponseMessage = EventResponseMessage.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEventInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java deleted file mode 100644 index 4e3cf87e840f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; -import java.io.IOException; -import java.util.List; - -/** - * The response from the GenerateCredentials operation. - */ -@Immutable -public final class GenerateCredentialsResultInner implements JsonSerializable { - /* - * The username for a container registry. - */ - private String username; - - /* - * The list of passwords for a container registry. - */ - private List passwords; - - /** - * Creates an instance of GenerateCredentialsResultInner class. - */ - private GenerateCredentialsResultInner() { - } - - /** - * Get the username property: The username for a container registry. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the passwords property: The list of passwords for a container registry. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GenerateCredentialsResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GenerateCredentialsResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GenerateCredentialsResultInner. - */ - public static GenerateCredentialsResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GenerateCredentialsResultInner deserializedGenerateCredentialsResultInner - = new GenerateCredentialsResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedGenerateCredentialsResultInner.username = reader.getString(); - } else if ("passwords".equals(fieldName)) { - List passwords = reader.readArray(reader1 -> TokenPassword.fromJson(reader1)); - deserializedGenerateCredentialsResultInner.passwords = passwords; - } else { - reader.skipChildren(); - } - } - - return deserializedGenerateCredentialsResultInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java deleted file mode 100644 index 3512c682db00..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; -import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; -import java.io.IOException; - -/** - * The definition of a container registry operation. - */ -@Immutable -public final class OperationDefinitionInner implements JsonSerializable { - /* - * The origin information of the container registry operation. - */ - private String origin; - - /* - * Operation name: {provider}/{resource}/{operation}. - */ - private String name; - - /* - * The display information for the container registry operation. - */ - private OperationDisplayDefinition display; - - /* - * The properties information for the container registry operation. - */ - private OperationPropertiesDefinition innerProperties; - - /* - * This property indicates if the operation is an action or a data action - * ref: - * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations - */ - private Boolean isDataAction; - - /** - * Creates an instance of OperationDefinitionInner class. - */ - private OperationDefinitionInner() { - } - - /** - * Get the origin property: The origin information of the container registry operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the display property: The display information for the container registry operation. - * - * @return the display value. - */ - public OperationDisplayDefinition display() { - return this.display; - } - - /** - * Get the innerProperties property: The properties information for the container registry operation. - * - * @return the innerProperties value. - */ - private OperationPropertiesDefinition innerProperties() { - return this.innerProperties; - } - - /** - * Get the isDataAction property: This property indicates if the operation is an action or a data action - * ref: - * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the serviceSpecification property: The definition of Azure Monitoring service. - * - * @return the serviceSpecification value. - */ - public OperationServiceSpecificationDefinition serviceSpecification() { - return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("origin", this.origin); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("display", this.display); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeBooleanField("isDataAction", this.isDataAction); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDefinitionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDefinitionInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDefinitionInner. - */ - public static OperationDefinitionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDefinitionInner deserializedOperationDefinitionInner = new OperationDefinitionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("origin".equals(fieldName)) { - deserializedOperationDefinitionInner.origin = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationDefinitionInner.name = reader.getString(); - } else if ("display".equals(fieldName)) { - deserializedOperationDefinitionInner.display = OperationDisplayDefinition.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedOperationDefinitionInner.innerProperties - = OperationPropertiesDefinition.fromJson(reader); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationDefinitionInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDefinitionInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java deleted file mode 100644 index bd12f4ad7427..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; -import java.io.IOException; - -/** - * The definition of Azure Monitoring properties. - */ -@Immutable -public final class OperationPropertiesDefinition implements JsonSerializable { - /* - * The definition of Azure Monitoring service. - */ - private OperationServiceSpecificationDefinition serviceSpecification; - - /** - * Creates an instance of OperationPropertiesDefinition class. - */ - private OperationPropertiesDefinition() { - } - - /** - * Get the serviceSpecification property: The definition of Azure Monitoring service. - * - * @return the serviceSpecification value. - */ - public OperationServiceSpecificationDefinition serviceSpecification() { - return this.serviceSpecification; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("serviceSpecification", this.serviceSpecification); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationPropertiesDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationPropertiesDefinition if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationPropertiesDefinition. - */ - public static OperationPropertiesDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationPropertiesDefinition deserializedOperationPropertiesDefinition - = new OperationPropertiesDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceSpecification".equals(fieldName)) { - deserializedOperationPropertiesDefinition.serviceSpecification - = OperationServiceSpecificationDefinition.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationPropertiesDefinition; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index 257b232e1dc3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import java.io.IOException; - -/** - * An object that represents a private endpoint connection for a container registry. - */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * The properties of a private endpoint connection. - */ - private PrivateEndpointConnectionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateEndpointConnectionInner class. - */ - public PrivateEndpointConnectionInner() { - } - - /** - * Get the properties property: The properties of a private endpoint connection. - * - * @return the properties value. - */ - public PrivateEndpointConnectionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of a private endpoint connection. - * - * @param properties the properties value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.properties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java deleted file mode 100644 index 92d0d7c909e2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; -import java.io.IOException; - -/** - * A private link resource. - */ -@Immutable -public final class PrivateLinkResourceInner extends ProxyResource { - /* - * A resource that supports private link capabilities. - */ - private PrivateLinkResourceProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateLinkResourceInner class. - */ - private PrivateLinkResourceInner() { - } - - /** - * Get the properties property: A resource that supports private link capabilities. - * - * @return the properties value. - */ - public PrivateLinkResourceProperties properties() { - return this.properties; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. - */ - public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java deleted file mode 100644 index 5b32d96a3cba..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * An object that represents a container registry. - */ -@Fluent -public final class RegistryInner extends Resource { - /* - * The properties of the container registry. - */ - private RegistryProperties properties; - - /* - * The SKU of the container registry. - */ - private Sku sku; - - /* - * The identity of the container registry. - */ - private IdentityProperties identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RegistryInner class. - */ - public RegistryInner() { - } - - /** - * Get the properties property: The properties of the container registry. - * - * @return the properties value. - */ - public RegistryProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the container registry. - * - * @param properties the properties value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withProperties(RegistryProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: The SKU of the container registry. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The SKU of the container registry. - * - * @param sku the sku value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: The identity of the container registry. - * - * @return the identity value. - */ - public IdentityProperties identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the container registry. - * - * @param identity the identity value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withIdentity(IdentityProperties identity) { - this.identity = identity; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegistryInner. - */ - public static RegistryInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryInner deserializedRegistryInner = new RegistryInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRegistryInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRegistryInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRegistryInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedRegistryInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRegistryInner.withTags(tags); - } else if ("sku".equals(fieldName)) { - deserializedRegistryInner.sku = Sku.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedRegistryInner.properties = RegistryProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedRegistryInner.identity = IdentityProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRegistryInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java deleted file mode 100644 index db166fef322f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; -import java.io.IOException; -import java.util.List; - -/** - * The response from the ListCredentials operation. - */ -@Immutable -public final class RegistryListCredentialsResultInner implements JsonSerializable { - /* - * The username for a container registry. - */ - private String username; - - /* - * The list of passwords for a container registry. - */ - private List passwords; - - /** - * Creates an instance of RegistryListCredentialsResultInner class. - */ - private RegistryListCredentialsResultInner() { - } - - /** - * Get the username property: The username for a container registry. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the passwords property: The list of passwords for a container registry. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryListCredentialsResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryListCredentialsResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryListCredentialsResultInner. - */ - public static RegistryListCredentialsResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryListCredentialsResultInner deserializedRegistryListCredentialsResultInner - = new RegistryListCredentialsResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedRegistryListCredentialsResultInner.username = reader.getString(); - } else if ("passwords".equals(fieldName)) { - List passwords = reader.readArray(reader1 -> RegistryPassword.fromJson(reader1)); - deserializedRegistryListCredentialsResultInner.passwords = passwords; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryListCredentialsResultInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java deleted file mode 100644 index 614b8d563b5a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The result of a request to check the availability of a container registry name. - */ -@Immutable -public final class RegistryNameStatusInner implements JsonSerializable { - /* - * The value that indicates whether the name is available. - */ - private Boolean nameAvailable; - - /* - * If any, the reason that the name is not available. - */ - private String reason; - - /* - * If any, the error message that provides more detail for the reason that the name is not available. - */ - private String message; - - /** - * Creates an instance of RegistryNameStatusInner class. - */ - private RegistryNameStatusInner() { - } - - /** - * Get the nameAvailable property: The value that indicates whether the name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the reason property: If any, the reason that the name is not available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Get the message property: If any, the error message that provides more detail for the reason that the name is not - * available. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable); - jsonWriter.writeStringField("reason", this.reason); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryNameStatusInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryNameStatusInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryNameStatusInner. - */ - public static RegistryNameStatusInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryNameStatusInner deserializedRegistryNameStatusInner = new RegistryNameStatusInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nameAvailable".equals(fieldName)) { - deserializedRegistryNameStatusInner.nameAvailable = reader.getNullable(JsonReader::getBoolean); - } else if ("reason".equals(fieldName)) { - deserializedRegistryNameStatusInner.reason = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedRegistryNameStatusInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryNameStatusInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java deleted file mode 100644 index 73cde11a3e37..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty; -import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions; -import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; -import com.azure.resourcemanager.containerregistry.generated.models.Policies; -import com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import java.io.IOException; - -/** - * The parameters for updating the properties of a container registry. - */ -@Fluent -public final class RegistryPropertiesUpdateParameters implements JsonSerializable { - /* - * The value that indicates whether the admin user is enabled. - */ - private Boolean adminUserEnabled; - - /* - * The network rule set for a container registry. - */ - private NetworkRuleSet networkRuleSet; - - /* - * The policies for a container registry. - */ - private Policies policies; - - /* - * The encryption settings of container registry. - */ - private EncryptionProperty encryption; - - /* - * Enable a single data endpoint per region for serving data. - */ - private Boolean dataEndpointEnabled; - - /* - * Whether or not public network access is allowed for the container registry. - */ - private PublicNetworkAccess publicNetworkAccess; - - /* - * Whether to allow trusted Azure services to access a network restricted registry. - */ - private NetworkRuleBypassOptions networkRuleBypassOptions; - - /* - * Whether to allow ACR Tasks service to access a network restricted registry. - */ - private Boolean networkRuleBypassAllowedForTasks; - - /* - * Enables registry-wide pull from unauthenticated clients. - */ - private Boolean anonymousPullEnabled; - - /* - * Determines registry role assignment mode. - */ - private RoleAssignmentMode roleAssignmentMode; - - /** - * Creates an instance of RegistryPropertiesUpdateParameters class. - */ - public RegistryPropertiesUpdateParameters() { - } - - /** - * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @return the adminUserEnabled value. - */ - public Boolean adminUserEnabled() { - return this.adminUserEnabled; - } - - /** - * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @param adminUserEnabled the adminUserEnabled value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) { - this.adminUserEnabled = adminUserEnabled; - return this; - } - - /** - * Get the networkRuleSet property: The network rule set for a container registry. - * - * @return the networkRuleSet value. - */ - public NetworkRuleSet networkRuleSet() { - return this.networkRuleSet; - } - - /** - * Set the networkRuleSet property: The network rule set for a container registry. - * - * @param networkRuleSet the networkRuleSet value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { - this.networkRuleSet = networkRuleSet; - return this; - } - - /** - * Get the policies property: The policies for a container registry. - * - * @return the policies value. - */ - public Policies policies() { - return this.policies; - } - - /** - * Set the policies property: The policies for a container registry. - * - * @param policies the policies value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withPolicies(Policies policies) { - this.policies = policies; - return this; - } - - /** - * Get the encryption property: The encryption settings of container registry. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of container registry. - * - * @param encryption the encryption value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @return the dataEndpointEnabled value. - */ - public Boolean dataEndpointEnabled() { - return this.dataEndpointEnabled; - } - - /** - * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @param dataEndpointEnabled the dataEndpointEnabled value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withDataEndpointEnabled(Boolean dataEndpointEnabled) { - this.dataEndpointEnabled = dataEndpointEnabled; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @return the networkRuleBypassOptions value. - */ - public NetworkRuleBypassOptions networkRuleBypassOptions() { - return this.networkRuleBypassOptions; - } - - /** - * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters - withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { - this.networkRuleBypassOptions = networkRuleBypassOptions; - return this; - } - - /** - * Get the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network - * restricted registry. - * - * @return the networkRuleBypassAllowedForTasks value. - */ - public Boolean networkRuleBypassAllowedForTasks() { - return this.networkRuleBypassAllowedForTasks; - } - - /** - * Set the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network - * restricted registry. - * - * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters - withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { - this.networkRuleBypassAllowedForTasks = networkRuleBypassAllowedForTasks; - return this; - } - - /** - * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @return the anonymousPullEnabled value. - */ - public Boolean anonymousPullEnabled() { - return this.anonymousPullEnabled; - } - - /** - * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @param anonymousPullEnabled the anonymousPullEnabled value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withAnonymousPullEnabled(Boolean anonymousPullEnabled) { - this.anonymousPullEnabled = anonymousPullEnabled; - return this; - } - - /** - * Get the roleAssignmentMode property: Determines registry role assignment mode. - * - * @return the roleAssignmentMode value. - */ - public RoleAssignmentMode roleAssignmentMode() { - return this.roleAssignmentMode; - } - - /** - * Set the roleAssignmentMode property: Determines registry role assignment mode. - * - * @param roleAssignmentMode the roleAssignmentMode value to set. - * @return the RegistryPropertiesUpdateParameters object itself. - */ - public RegistryPropertiesUpdateParameters withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { - this.roleAssignmentMode = roleAssignmentMode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("adminUserEnabled", this.adminUserEnabled); - jsonWriter.writeJsonField("networkRuleSet", this.networkRuleSet); - jsonWriter.writeJsonField("policies", this.policies); - jsonWriter.writeJsonField("encryption", this.encryption); - jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeStringField("networkRuleBypassOptions", - this.networkRuleBypassOptions == null ? null : this.networkRuleBypassOptions.toString()); - jsonWriter.writeBooleanField("networkRuleBypassAllowedForTasks", this.networkRuleBypassAllowedForTasks); - jsonWriter.writeBooleanField("anonymousPullEnabled", this.anonymousPullEnabled); - jsonWriter.writeStringField("roleAssignmentMode", - this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPropertiesUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryPropertiesUpdateParameters. - */ - public static RegistryPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPropertiesUpdateParameters deserializedRegistryPropertiesUpdateParameters - = new RegistryPropertiesUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adminUserEnabled".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.adminUserEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("networkRuleSet".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.networkRuleSet = NetworkRuleSet.fromJson(reader); - } else if ("policies".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.policies = Policies.fromJson(reader); - } else if ("encryption".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.encryption = EncryptionProperty.fromJson(reader); - } else if ("dataEndpointEnabled".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.dataEndpointEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("networkRuleBypassOptions".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.networkRuleBypassOptions - = NetworkRuleBypassOptions.fromString(reader.getString()); - } else if ("networkRuleBypassAllowedForTasks".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.networkRuleBypassAllowedForTasks - = reader.getNullable(JsonReader::getBoolean); - } else if ("anonymousPullEnabled".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.anonymousPullEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("roleAssignmentMode".equals(fieldName)) { - deserializedRegistryPropertiesUpdateParameters.roleAssignmentMode - = RoleAssignmentMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPropertiesUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java deleted file mode 100644 index 5c538c4370c3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to get container registry quota usages. - */ -@Immutable -public final class RegistryUsageListResultInner implements JsonSerializable { - /* - * The list of container registry quota usages. - */ - private List value; - - /** - * Creates an instance of RegistryUsageListResultInner class. - */ - private RegistryUsageListResultInner() { - } - - /** - * Get the value property: The list of container registry quota usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryUsageListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryUsageListResultInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryUsageListResultInner. - */ - public static RegistryUsageListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryUsageListResultInner deserializedRegistryUsageListResultInner = new RegistryUsageListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RegistryUsage.fromJson(reader1)); - deserializedRegistryUsageListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryUsageListResultInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java deleted file mode 100644 index 2d646eecdb30..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * An object that represents a replication for a container registry. - */ -@Fluent -public final class ReplicationInner extends Resource { - /* - * The properties of the replication. - */ - private ReplicationProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ReplicationInner class. - */ - public ReplicationInner() { - } - - /** - * Get the properties property: The properties of the replication. - * - * @return the properties value. - */ - public ReplicationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the replication. - * - * @param properties the properties value to set. - * @return the ReplicationInner object itself. - */ - public ReplicationInner withProperties(ReplicationProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ReplicationInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ReplicationInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReplicationInner. - */ - public static ReplicationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationInner deserializedReplicationInner = new ReplicationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicationInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedReplicationInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedReplicationInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedReplicationInner.properties = ReplicationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedReplicationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java deleted file mode 100644 index bae350af88c5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ReplicationUpdateParametersProperties model. - */ -@Fluent -public final class ReplicationUpdateParametersProperties - implements JsonSerializable { - /* - * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication - * whose regional endpoint is disabled, however its data will continue to be synced with other replications. - */ - private Boolean regionEndpointEnabled; - - /** - * Creates an instance of ReplicationUpdateParametersProperties class. - */ - public ReplicationUpdateParametersProperties() { - } - - /** - * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @return the regionEndpointEnabled value. - */ - public Boolean regionEndpointEnabled() { - return this.regionEndpointEnabled; - } - - /** - * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @param regionEndpointEnabled the regionEndpointEnabled value to set. - * @return the ReplicationUpdateParametersProperties object itself. - */ - public ReplicationUpdateParametersProperties withRegionEndpointEnabled(Boolean regionEndpointEnabled) { - this.regionEndpointEnabled = regionEndpointEnabled; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("regionEndpointEnabled", this.regionEndpointEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationUpdateParametersProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationUpdateParametersProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationUpdateParametersProperties. - */ - public static ReplicationUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationUpdateParametersProperties deserializedReplicationUpdateParametersProperties - = new ReplicationUpdateParametersProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("regionEndpointEnabled".equals(fieldName)) { - deserializedReplicationUpdateParametersProperties.regionEndpointEnabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationUpdateParametersProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java deleted file mode 100644 index 609180d7f22e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.io.IOException; - -/** - * An object that represents a scope map for a container registry. - */ -@Fluent -public final class ScopeMapInner extends ProxyResource { - /* - * The properties of the scope map. - */ - private ScopeMapProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ScopeMapInner class. - */ - public ScopeMapInner() { - } - - /** - * Get the properties property: The properties of the scope map. - * - * @return the properties value. - */ - public ScopeMapProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the scope map. - * - * @param properties the properties value to set. - * @return the ScopeMapInner object itself. - */ - public ScopeMapInner withProperties(ScopeMapProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScopeMapInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScopeMapInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScopeMapInner. - */ - public static ScopeMapInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScopeMapInner deserializedScopeMapInner = new ScopeMapInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScopeMapInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScopeMapInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScopeMapInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScopeMapInner.properties = ScopeMapProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScopeMapInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScopeMapInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java deleted file mode 100644 index 59409b162b12..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The update parameters for scope map properties. - */ -@Fluent -public final class ScopeMapPropertiesUpdateParameters implements JsonSerializable { - /* - * The user friendly description of the scope map. - */ - private String description; - - /* - * The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete - */ - private List actions; - - /** - * Creates an instance of ScopeMapPropertiesUpdateParameters class. - */ - public ScopeMapPropertiesUpdateParameters() { - } - - /** - * Get the description property: The user friendly description of the scope map. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The user friendly description of the scope map. - * - * @param description the description value to set. - * @return the ScopeMapPropertiesUpdateParameters object itself. - */ - public ScopeMapPropertiesUpdateParameters withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actions property: The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * - * @param actions the actions value to set. - * @return the ScopeMapPropertiesUpdateParameters object itself. - */ - public ScopeMapPropertiesUpdateParameters withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScopeMapPropertiesUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScopeMapPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScopeMapPropertiesUpdateParameters. - */ - public static ScopeMapPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScopeMapPropertiesUpdateParameters deserializedScopeMapPropertiesUpdateParameters - = new ScopeMapPropertiesUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedScopeMapPropertiesUpdateParameters.description = reader.getString(); - } else if ("actions".equals(fieldName)) { - List actions = reader.readArray(reader1 -> reader1.getString()); - deserializedScopeMapPropertiesUpdateParameters.actions = actions; - } else { - reader.skipChildren(); - } - } - - return deserializedScopeMapPropertiesUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java deleted file mode 100644 index 62bdb56e36aa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; -import java.io.IOException; - -/** - * An object that represents a token for a container registry. - */ -@Fluent -public final class TokenInner extends ProxyResource { - /* - * The properties of the token. - */ - private TokenProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of TokenInner class. - */ - public TokenInner() { - } - - /** - * Get the properties property: The properties of the token. - * - * @return the properties value. - */ - public TokenProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the token. - * - * @param properties the properties value to set. - * @return the TokenInner object itself. - */ - public TokenInner withProperties(TokenProperties properties) { - this.properties = properties; - return this; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TokenInner. - */ - public static TokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenInner deserializedTokenInner = new TokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedTokenInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedTokenInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedTokenInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedTokenInner.properties = TokenProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedTokenInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java deleted file mode 100644 index 96db882524a5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; -import java.io.IOException; - -/** - * The parameters for updating token properties. - */ -@Fluent -public final class TokenUpdateProperties implements JsonSerializable { - /* - * The resource ID of the scope map to which the token will be associated with. - */ - private String scopeMapId; - - /* - * The status of the token example enabled or disabled. - */ - private TokenStatus status; - - /* - * The credentials that can be used for authenticating the token. - */ - private TokenCredentialsProperties credentials; - - /** - * Creates an instance of TokenUpdateProperties class. - */ - public TokenUpdateProperties() { - } - - /** - * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @return the scopeMapId value. - */ - public String scopeMapId() { - return this.scopeMapId; - } - - /** - * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @param scopeMapId the scopeMapId value to set. - * @return the TokenUpdateProperties object itself. - */ - public TokenUpdateProperties withScopeMapId(String scopeMapId) { - this.scopeMapId = scopeMapId; - return this; - } - - /** - * Get the status property: The status of the token example enabled or disabled. - * - * @return the status value. - */ - public TokenStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the token example enabled or disabled. - * - * @param status the status value to set. - * @return the TokenUpdateProperties object itself. - */ - public TokenUpdateProperties withStatus(TokenStatus status) { - this.status = status; - return this; - } - - /** - * Get the credentials property: The credentials that can be used for authenticating the token. - * - * @return the credentials value. - */ - public TokenCredentialsProperties credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials that can be used for authenticating the token. - * - * @param credentials the credentials value to set. - * @return the TokenUpdateProperties object itself. - */ - public TokenUpdateProperties withCredentials(TokenCredentialsProperties credentials) { - this.credentials = credentials; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scopeMapId", this.scopeMapId); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenUpdateProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenUpdateProperties. - */ - public static TokenUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenUpdateProperties deserializedTokenUpdateProperties = new TokenUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scopeMapId".equals(fieldName)) { - deserializedTokenUpdateProperties.scopeMapId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedTokenUpdateProperties.status = TokenStatus.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedTokenUpdateProperties.credentials = TokenCredentialsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenUpdateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java deleted file mode 100644 index acafeea1bcc2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; -import java.io.IOException; -import java.util.Map; - -/** - * An object that represents a webhook for a container registry. - */ -@Immutable -public final class WebhookInner extends Resource { - /* - * The properties of the webhook. - */ - private WebhookProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WebhookInner class. - */ - private WebhookInner() { - } - - /** - * Get the properties property: The properties of the webhook. - * - * @return the properties value. - */ - public WebhookProperties properties() { - return this.properties; - } - - /** - * 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WebhookInner. - */ - public static WebhookInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookInner deserializedWebhookInner = new WebhookInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWebhookInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWebhookInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWebhookInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWebhookInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWebhookInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedWebhookInner.properties = WebhookProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWebhookInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookInner; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java deleted file mode 100644 index 6cca061685c2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The parameters for creating the properties of a webhook. - */ -@Fluent -public final class WebhookPropertiesCreateParameters implements JsonSerializable { - /* - * The service URI for the webhook to post notifications. - */ - private String serviceUri; - - /* - * Custom headers that will be added to the webhook notifications. - */ - private Map customHeaders; - - /* - * The status of the webhook at the time the operation was called. - */ - private WebhookStatus status; - - /* - * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under - * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all - * events. - */ - private String scope; - - /* - * The list of actions that trigger the webhook to post notifications. - */ - private List actions; - - /** - * Creates an instance of WebhookPropertiesCreateParameters class. - */ - public WebhookPropertiesCreateParameters() { - } - - /** - * Get the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - public String serviceUri() { - return this.serviceUri; - } - - /** - * Set the serviceUri property: The service URI for the webhook to post notifications. - * - * @param serviceUri the serviceUri value to set. - * @return the WebhookPropertiesCreateParameters object itself. - */ - public WebhookPropertiesCreateParameters withServiceUri(String serviceUri) { - this.serviceUri = serviceUri; - return this; - } - - /** - * Get the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - public Map customHeaders() { - return this.customHeaders; - } - - /** - * Set the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @param customHeaders the customHeaders value to set. - * @return the WebhookPropertiesCreateParameters object itself. - */ - public WebhookPropertiesCreateParameters withCustomHeaders(Map customHeaders) { - this.customHeaders = customHeaders; - return this; - } - - /** - * Get the status property: The status of the webhook at the time the operation was called. - * - * @return the status value. - */ - public WebhookStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the webhook at the time the operation was called. - * - * @param status the status value to set. - * @return the WebhookPropertiesCreateParameters object itself. - */ - public WebhookPropertiesCreateParameters withStatus(WebhookStatus status) { - this.status = status; - return this; - } - - /** - * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @param scope the scope value to set. - * @return the WebhookPropertiesCreateParameters object itself. - */ - public WebhookPropertiesCreateParameters withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Get the actions property: The list of actions that trigger the webhook to post notifications. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: The list of actions that trigger the webhook to post notifications. - * - * @param actions the actions value to set. - * @return the WebhookPropertiesCreateParameters object itself. - */ - public WebhookPropertiesCreateParameters withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceUri", this.serviceUri); - jsonWriter.writeArrayField("actions", this.actions, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("scope", this.scope); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookPropertiesCreateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookPropertiesCreateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WebhookPropertiesCreateParameters. - */ - public static WebhookPropertiesCreateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookPropertiesCreateParameters deserializedWebhookPropertiesCreateParameters - = new WebhookPropertiesCreateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceUri".equals(fieldName)) { - deserializedWebhookPropertiesCreateParameters.serviceUri = reader.getString(); - } else if ("actions".equals(fieldName)) { - List actions - = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); - deserializedWebhookPropertiesCreateParameters.actions = actions; - } else if ("customHeaders".equals(fieldName)) { - Map customHeaders = reader.readMap(reader1 -> reader1.getString()); - deserializedWebhookPropertiesCreateParameters.customHeaders = customHeaders; - } else if ("status".equals(fieldName)) { - deserializedWebhookPropertiesCreateParameters.status = WebhookStatus.fromString(reader.getString()); - } else if ("scope".equals(fieldName)) { - deserializedWebhookPropertiesCreateParameters.scope = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookPropertiesCreateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java deleted file mode 100644 index 0c1f88aabff3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The parameters for updating the properties of a webhook. - */ -@Fluent -public final class WebhookPropertiesUpdateParameters implements JsonSerializable { - /* - * The service URI for the webhook to post notifications. - */ - private String serviceUri; - - /* - * Custom headers that will be added to the webhook notifications. - */ - private Map customHeaders; - - /* - * The status of the webhook at the time the operation was called. - */ - private WebhookStatus status; - - /* - * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under - * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all - * events. - */ - private String scope; - - /* - * The list of actions that trigger the webhook to post notifications. - */ - private List actions; - - /** - * Creates an instance of WebhookPropertiesUpdateParameters class. - */ - public WebhookPropertiesUpdateParameters() { - } - - /** - * Get the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - public String serviceUri() { - return this.serviceUri; - } - - /** - * Set the serviceUri property: The service URI for the webhook to post notifications. - * - * @param serviceUri the serviceUri value to set. - * @return the WebhookPropertiesUpdateParameters object itself. - */ - public WebhookPropertiesUpdateParameters withServiceUri(String serviceUri) { - this.serviceUri = serviceUri; - return this; - } - - /** - * Get the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - public Map customHeaders() { - return this.customHeaders; - } - - /** - * Set the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @param customHeaders the customHeaders value to set. - * @return the WebhookPropertiesUpdateParameters object itself. - */ - public WebhookPropertiesUpdateParameters withCustomHeaders(Map customHeaders) { - this.customHeaders = customHeaders; - return this; - } - - /** - * Get the status property: The status of the webhook at the time the operation was called. - * - * @return the status value. - */ - public WebhookStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the webhook at the time the operation was called. - * - * @param status the status value to set. - * @return the WebhookPropertiesUpdateParameters object itself. - */ - public WebhookPropertiesUpdateParameters withStatus(WebhookStatus status) { - this.status = status; - return this; - } - - /** - * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @param scope the scope value to set. - * @return the WebhookPropertiesUpdateParameters object itself. - */ - public WebhookPropertiesUpdateParameters withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Get the actions property: The list of actions that trigger the webhook to post notifications. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: The list of actions that trigger the webhook to post notifications. - * - * @param actions the actions value to set. - * @return the WebhookPropertiesUpdateParameters object itself. - */ - public WebhookPropertiesUpdateParameters withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceUri", this.serviceUri); - jsonWriter.writeMapField("customHeaders", this.customHeaders, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("scope", this.scope); - jsonWriter.writeArrayField("actions", this.actions, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookPropertiesUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookPropertiesUpdateParameters. - */ - public static WebhookPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookPropertiesUpdateParameters deserializedWebhookPropertiesUpdateParameters - = new WebhookPropertiesUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceUri".equals(fieldName)) { - deserializedWebhookPropertiesUpdateParameters.serviceUri = reader.getString(); - } else if ("customHeaders".equals(fieldName)) { - Map customHeaders = reader.readMap(reader1 -> reader1.getString()); - deserializedWebhookPropertiesUpdateParameters.customHeaders = customHeaders; - } else if ("status".equals(fieldName)) { - deserializedWebhookPropertiesUpdateParameters.status = WebhookStatus.fromString(reader.getString()); - } else if ("scope".equals(fieldName)) { - deserializedWebhookPropertiesUpdateParameters.scope = reader.getString(); - } else if ("actions".equals(fieldName)) { - List actions - = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); - deserializedWebhookPropertiesUpdateParameters.actions = actions; - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookPropertiesUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java deleted file mode 100644 index 62d249717174..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the inner data models for ContainerRegistry. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -package com.azure.resourcemanager.containerregistry.generated.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java deleted file mode 100644 index ff6059c746ce..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the service clients for ContainerRegistry. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -package com.azure.resourcemanager.containerregistry.generated.fluent; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java deleted file mode 100644 index 58c89406b446..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; - -public final class CacheRuleImpl implements CacheRule, CacheRule.Definition, CacheRule.Update { - private CacheRuleInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CacheRuleProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CacheRuleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String cacheRuleName; - - private CacheRuleUpdateParameters updateCacheRuleUpdateParameters; - - public CacheRuleImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public CacheRule create() { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .create(resourceGroupName, registryName, cacheRuleName, this.innerModel(), Context.NONE); - return this; - } - - public CacheRule create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .create(resourceGroupName, registryName, cacheRuleName, this.innerModel(), context); - return this; - } - - CacheRuleImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new CacheRuleInner(); - this.serviceManager = serviceManager; - this.cacheRuleName = name; - } - - public CacheRuleImpl update() { - this.updateCacheRuleUpdateParameters = new CacheRuleUpdateParameters(); - return this; - } - - public CacheRule apply() { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .update(resourceGroupName, registryName, cacheRuleName, updateCacheRuleUpdateParameters, Context.NONE); - return this; - } - - public CacheRule apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .update(resourceGroupName, registryName, cacheRuleName, updateCacheRuleUpdateParameters, context); - return this; - } - - CacheRuleImpl(CacheRuleInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.cacheRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cacheRules"); - } - - public CacheRule refresh() { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE) - .getValue(); - return this; - } - - public CacheRule refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCacheRules() - .getWithResponse(resourceGroupName, registryName, cacheRuleName, context) - .getValue(); - return this; - } - - public CacheRuleImpl withProperties(CacheRuleProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public CacheRuleImpl withCredentialSetResourceId(String credentialSetResourceId) { - this.updateCacheRuleUpdateParameters.withCredentialSetResourceId(credentialSetResourceId); - return this; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java deleted file mode 100644 index f73d9a29ebe9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java +++ /dev/null @@ -1,980 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.CacheRulesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters; -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 CacheRulesClient. - */ -public final class CacheRulesClientImpl implements CacheRulesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CacheRulesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of CacheRulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CacheRulesClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(CacheRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientCacheRules to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientCacheRules") - public interface CacheRulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CacheRuleInner cacheRuleCreateParameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified cache rule resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, accept, context); - } - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified cache rule resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String cacheRuleName) { - return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context).block(); - } - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified cache rule resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName) { - return getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE).getValue(); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, - cacheRuleCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleCreateParameters, context); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CacheRuleInner> beginCreateAsync(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CacheRuleInner.class, CacheRuleInner.class, this.client.getContext()); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CacheRuleInner> beginCreateAsync(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, - cacheRuleCreateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CacheRuleInner.class, CacheRuleInner.class, context); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { - return this.beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters) - .getSyncPoller(); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CacheRuleInner> beginCreate(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) - .getSyncPoller(); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters) { - return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters).block(); - } - - /** - * Creates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleCreateParameters The parameters for creating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheRuleInner create(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleInner cacheRuleCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context).block(); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, - cacheRuleUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleUpdateParameters, context); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CacheRuleInner> beginUpdateAsync(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CacheRuleInner.class, CacheRuleInner.class, this.client.getContext()); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CacheRuleInner> beginUpdateAsync(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, - cacheRuleUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CacheRuleInner.class, CacheRuleInner.class, context); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CacheRuleInner> beginUpdate(String resourceGroupName, - String registryName, String cacheRuleName, CacheRuleUpdateParameters cacheRuleUpdateParameters, - Context context) { - return this.beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters) { - return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters).block(); - } - - /** - * Updates a cache rule for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @param cacheRuleUpdateParameters The parameters for updating a cache rule. - * @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 an object that represents a cache rule for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheRuleInner update(String resourceGroupName, String registryName, String cacheRuleName, - CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context).block(); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String cacheRuleName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 registryName, - String cacheRuleName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, context); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String cacheRuleName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String cacheRuleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String cacheRuleName) { - return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName).getSyncPoller(); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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> beginDelete(String resourceGroupName, String registryName, - String cacheRuleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context).getSyncPoller(); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String cacheRuleName) { - return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 deleteAsync(String resourceGroupName, String registryName, String cacheRuleName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String cacheRuleName) { - deleteAsync(resourceGroupName, registryName, cacheRuleName).block(); - } - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context) { - deleteAsync(resourceGroupName, registryName, cacheRuleName, context).block(); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java deleted file mode 100644 index b8e5b8f5edb8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.CacheRulesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; -import com.azure.resourcemanager.containerregistry.generated.models.CacheRules; - -public final class CacheRulesImpl implements CacheRules { - private static final ClientLogger LOGGER = new ClientLogger(CacheRulesImpl.class); - - private final CacheRulesClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public CacheRulesImpl(CacheRulesClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, cacheRuleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CacheRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CacheRule get(String resourceGroupName, String registryName, String cacheRuleName) { - CacheRuleInner inner = this.serviceClient().get(resourceGroupName, registryName, cacheRuleName); - if (inner != null) { - return new CacheRuleImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String cacheRuleName) { - this.serviceClient().delete(resourceGroupName, registryName, cacheRuleName); - } - - public void delete(String resourceGroupName, String registryName, String cacheRuleName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, cacheRuleName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheRuleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheRuleImpl(inner1, this.manager())); - } - - public CacheRule getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); - if (cacheRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); - if (cacheRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, cacheRuleName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); - if (cacheRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); - } - this.delete(resourceGroupName, registryName, cacheRuleName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String cacheRuleName = ResourceManagerUtils.getValueFromIdByName(id, "cacheRules"); - if (cacheRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cacheRules'.", id))); - } - this.delete(resourceGroupName, registryName, cacheRuleName, context); - } - - private CacheRulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public CacheRuleImpl define(String name) { - return new CacheRuleImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java deleted file mode 100644 index f8329ee7d8cc..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; -import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; -import java.util.Collections; -import java.util.Map; - -public final class CallbackConfigImpl implements CallbackConfig { - private CallbackConfigInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - CallbackConfigImpl(CallbackConfigInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String serviceUri() { - return this.innerModel().serviceUri(); - } - - public Map customHeaders() { - Map inner = this.innerModel().customHeaders(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public CallbackConfigInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java deleted file mode 100644 index 26a016d11ba5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java +++ /dev/null @@ -1,1248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ConnectedRegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; -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 ConnectedRegistriesClient. - */ -public final class ConnectedRegistriesClientImpl implements ConnectedRegistriesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectedRegistriesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of ConnectedRegistriesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedRegistriesClientImpl(ContainerRegistryManagementClientImpl client) { - this.service = RestProxy.create(ConnectedRegistriesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientConnectedRegistries to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientConnectedRegistries") - public interface ConnectedRegistriesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ConnectedRegistryInner connectedRegistryCreateParameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deactivate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the connected registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context); - } - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the connected registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, - String connectedRegistryName) { - return getWithResponseAsync(resourceGroupName, registryName, connectedRegistryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); - } - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the connected registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedRegistryInner get(String resourceGroupName, String registryName, String connectedRegistryName) { - return getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE).getValue(); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, - accept, connectedRegistryCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, contentType, accept, - connectedRegistryCreateParameters, context); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedRegistryInner> beginCreateAsync( - String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters) { - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, - connectedRegistryName, connectedRegistryCreateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, - this.client.getContext()); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedRegistryInner> beginCreateAsync( - String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, - connectedRegistryName, connectedRegistryCreateParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, context); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, - String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { - return this - .beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters) - .getSyncPoller(); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedRegistryInner> beginCreate(String resourceGroupName, - String registryName, String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, - Context context) { - return this - .beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, - context) - .getSyncPoller(); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, - connectedRegistryCreateParameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, connectedRegistryName, - connectedRegistryCreateParameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters) { - return createAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters) - .block(); - } - - /** - * Creates a connected registry for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedRegistryInner create(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryInner connectedRegistryCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, - context).block(); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, - accept, connectedRegistryUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, - Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, contentType, accept, - connectedRegistryUpdateParameters, context); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedRegistryInner> beginUpdateAsync( - String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, - connectedRegistryName, connectedRegistryUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, - this.client.getContext()); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedRegistryInner> beginUpdateAsync( - String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, - connectedRegistryName, connectedRegistryUpdateParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedRegistryInner.class, ConnectedRegistryInner.class, context); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, - String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { - return this - .beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedRegistryInner> beginUpdate(String resourceGroupName, - String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { - return this - .beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, - context) - .getSyncPoller(); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, - connectedRegistryUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - String connectedRegistryName, ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, - Context context) { - return beginUpdateAsync(resourceGroupName, registryName, connectedRegistryName, - connectedRegistryUpdateParameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters) { - return updateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters) - .block(); - } - - /** - * Updates a connected registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. - * @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 an object that represents a connected registry for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedRegistryInner update(String resourceGroupName, String registryName, String connectedRegistryName, - ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, - context).block(); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String connectedRegistryName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 registryName, - String connectedRegistryName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, context); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String connectedRegistryName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, connectedRegistryName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String connectedRegistryName) { - return this.beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName).getSyncPoller(); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDelete(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName, context).getSyncPoller(); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String connectedRegistryName) { - return beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deleteAsync(String resourceGroupName, String registryName, String connectedRegistryName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, connectedRegistryName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String connectedRegistryName) { - deleteAsync(resourceGroupName, registryName, connectedRegistryName).block(); - } - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context) { - deleteAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String filter) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, filter, 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())); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String filter, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter, context)); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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>> deactivateWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName) { - return FluxUtil - .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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>> deactivateWithResponseAsync(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - context = this.client.mergeContext(context); - return service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeactivateAsync(String resourceGroupName, String registryName, - String connectedRegistryName) { - Mono>> mono - = deactivateWithResponseAsync(resourceGroupName, registryName, connectedRegistryName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDeactivateAsync(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deactivateWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeactivate(String resourceGroupName, String registryName, - String connectedRegistryName) { - return this.beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName).getSyncPoller(); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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> beginDeactivate(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - return this.beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName, context) - .getSyncPoller(); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 deactivateAsync(String resourceGroupName, String registryName, String connectedRegistryName) { - return beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivateAsync(String resourceGroupName, String registryName, String connectedRegistryName, - Context context) { - return beginDeactivateAsync(resourceGroupName, registryName, connectedRegistryName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName) { - deactivateAsync(resourceGroupName, registryName, connectedRegistryName).block(); - } - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, - Context context) { - deactivateAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java deleted file mode 100644 index fda25fc724bf..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ConnectedRegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistries; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; - -public final class ConnectedRegistriesImpl implements ConnectedRegistries { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedRegistriesImpl.class); - - private final ConnectedRegistriesClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public ConnectedRegistriesImpl(ConnectedRegistriesClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String connectedRegistryName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, connectedRegistryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectedRegistryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedRegistry get(String resourceGroupName, String registryName, String connectedRegistryName) { - ConnectedRegistryInner inner = this.serviceClient().get(resourceGroupName, registryName, connectedRegistryName); - if (inner != null) { - return new ConnectedRegistryImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String connectedRegistryName) { - this.serviceClient().delete(resourceGroupName, registryName, connectedRegistryName); - } - - public void delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, connectedRegistryName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedRegistryImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedRegistryImpl(inner1, this.manager())); - } - - public void deactivate(String resourceGroupName, String registryName, String connectedRegistryName) { - this.serviceClient().deactivate(resourceGroupName, registryName, connectedRegistryName); - } - - public void deactivate(String resourceGroupName, String registryName, String connectedRegistryName, - Context context) { - this.serviceClient().deactivate(resourceGroupName, registryName, connectedRegistryName, context); - } - - public ConnectedRegistry getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); - if (connectedRegistryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); - if (connectedRegistryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, connectedRegistryName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); - if (connectedRegistryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); - } - this.delete(resourceGroupName, registryName, connectedRegistryName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(id, "connectedRegistries"); - if (connectedRegistryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedRegistries'.", id))); - } - this.delete(resourceGroupName, registryName, connectedRegistryName, context); - } - - private ConnectedRegistriesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public ConnectedRegistryImpl define(String name) { - return new ConnectedRegistryImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java deleted file mode 100644 index a37a45523fca..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; -import java.util.List; - -public final class ConnectedRegistryImpl - implements ConnectedRegistry, ConnectedRegistry.Definition, ConnectedRegistry.Update { - private ConnectedRegistryInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ConnectedRegistryProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ConnectedRegistryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String connectedRegistryName; - - private ConnectedRegistryUpdateParameters updateConnectedRegistryUpdateParameters; - - public ConnectedRegistryImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public ConnectedRegistry create() { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .create(resourceGroupName, registryName, connectedRegistryName, this.innerModel(), Context.NONE); - return this; - } - - public ConnectedRegistry create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .create(resourceGroupName, registryName, connectedRegistryName, this.innerModel(), context); - return this; - } - - ConnectedRegistryImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new ConnectedRegistryInner(); - this.serviceManager = serviceManager; - this.connectedRegistryName = name; - } - - public ConnectedRegistryImpl update() { - this.updateConnectedRegistryUpdateParameters = new ConnectedRegistryUpdateParameters(); - return this; - } - - public ConnectedRegistry apply() { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .update(resourceGroupName, registryName, connectedRegistryName, updateConnectedRegistryUpdateParameters, - Context.NONE); - return this; - } - - public ConnectedRegistry apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .update(resourceGroupName, registryName, connectedRegistryName, updateConnectedRegistryUpdateParameters, - context); - return this; - } - - ConnectedRegistryImpl(ConnectedRegistryInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.connectedRegistryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedRegistries"); - } - - public ConnectedRegistry refresh() { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .getWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE) - .getValue(); - return this; - } - - public ConnectedRegistry refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectedRegistries() - .getWithResponse(resourceGroupName, registryName, connectedRegistryName, context) - .getValue(); - return this; - } - - public void deactivate() { - serviceManager.connectedRegistries().deactivate(resourceGroupName, registryName, connectedRegistryName); - } - - public void deactivate(Context context) { - serviceManager.connectedRegistries() - .deactivate(resourceGroupName, registryName, connectedRegistryName, context); - } - - public ConnectedRegistryImpl withProperties(ConnectedRegistryProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ConnectedRegistryImpl withSyncProperties(SyncUpdateProperties syncProperties) { - this.updateConnectedRegistryUpdateParameters.withSyncProperties(syncProperties); - return this; - } - - public ConnectedRegistryImpl withLogging(LoggingProperties logging) { - this.updateConnectedRegistryUpdateParameters.withLogging(logging); - return this; - } - - public ConnectedRegistryImpl withClientTokenIds(List clientTokenIds) { - this.updateConnectedRegistryUpdateParameters.withClientTokenIds(clientTokenIds); - return this; - } - - public ConnectedRegistryImpl withNotificationsList(List notificationsList) { - this.updateConnectedRegistryUpdateParameters.withNotificationsList(notificationsList); - return this; - } - - public ConnectedRegistryImpl withGarbageCollection(GarbageCollectionProperties garbageCollection) { - this.updateConnectedRegistryUpdateParameters.withGarbageCollection(garbageCollection); - return this; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java deleted file mode 100644 index 038f28d07eac..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the ContainerRegistryManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { ContainerRegistryManagementClientImpl.class }) -public final class ContainerRegistryManagementClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the ContainerRegistryManagementClientBuilder. - */ - public ContainerRegistryManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of ContainerRegistryManagementClientImpl with the provided parameters. - * - * @return an instance of ContainerRegistryManagementClientImpl. - */ - public ContainerRegistryManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ContainerRegistryManagementClientImpl client = new ContainerRegistryManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java deleted file mode 100644 index 09a30d73f504..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the ContainerRegistryManagementClientImpl type. - */ -@ServiceClient(builder = ContainerRegistryManagementClientBuilder.class) -public final class ContainerRegistryManagementClientImpl implements ContainerRegistryManagementClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The RegistriesClient object to access its operations. - */ - private final RegistriesClient registries; - - /** - * Gets the RegistriesClient object to access its operations. - * - * @return the RegistriesClient object. - */ - public RegistriesClient getRegistries() { - return this.registries; - } - - /** - * The CacheRulesClient object to access its operations. - */ - private final CacheRulesClient cacheRules; - - /** - * Gets the CacheRulesClient object to access its operations. - * - * @return the CacheRulesClient object. - */ - public CacheRulesClient getCacheRules() { - return this.cacheRules; - } - - /** - * The CredentialSetsClient object to access its operations. - */ - private final CredentialSetsClient credentialSets; - - /** - * Gets the CredentialSetsClient object to access its operations. - * - * @return the CredentialSetsClient object. - */ - public CredentialSetsClient getCredentialSets() { - return this.credentialSets; - } - - /** - * The ConnectedRegistriesClient object to access its operations. - */ - private final ConnectedRegistriesClient connectedRegistries; - - /** - * Gets the ConnectedRegistriesClient object to access its operations. - * - * @return the ConnectedRegistriesClient object. - */ - public ConnectedRegistriesClient getConnectedRegistries() { - return this.connectedRegistries; - } - - /** - * The PrivateEndpointConnectionsClient object to access its operations. - */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * The ReplicationsClient object to access its operations. - */ - private final ReplicationsClient replications; - - /** - * Gets the ReplicationsClient object to access its operations. - * - * @return the ReplicationsClient object. - */ - public ReplicationsClient getReplications() { - return this.replications; - } - - /** - * The ScopeMapsClient object to access its operations. - */ - private final ScopeMapsClient scopeMaps; - - /** - * Gets the ScopeMapsClient object to access its operations. - * - * @return the ScopeMapsClient object. - */ - public ScopeMapsClient getScopeMaps() { - return this.scopeMaps; - } - - /** - * The TokensClient object to access its operations. - */ - private final TokensClient tokens; - - /** - * Gets the TokensClient object to access its operations. - * - * @return the TokensClient object. - */ - public TokensClient getTokens() { - return this.tokens; - } - - /** - * The WebhooksClient object to access its operations. - */ - private final WebhooksClient webhooks; - - /** - * Gets the WebhooksClient object to access its operations. - * - * @return the WebhooksClient object. - */ - public WebhooksClient getWebhooks() { - return this.webhooks; - } - - /** - * Initializes an instance of ContainerRegistryManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @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 endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - ContainerRegistryManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2025-11-01"; - this.operations = new OperationsClientImpl(this); - this.registries = new RegistriesClientImpl(this); - this.cacheRules = new CacheRulesClientImpl(this); - this.credentialSets = new CredentialSetsClientImpl(this); - this.connectedRegistries = new ConnectedRegistriesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.replications = new ReplicationsClientImpl(this); - this.scopeMaps = new ScopeMapsClientImpl(this); - this.tokens = new TokensClientImpl(this); - this.webhooks = new WebhooksClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryManagementClientImpl.class); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java deleted file mode 100644 index d24432715499..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import java.util.List; - -public final class CredentialSetImpl implements CredentialSet, CredentialSet.Definition, CredentialSet.Update { - private CredentialSetInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CredentialSetProperties properties() { - return this.innerModel().properties(); - } - - public IdentityProperties identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CredentialSetInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String credentialSetName; - - private CredentialSetUpdateParameters updateCredentialSetUpdateParameters; - - public CredentialSetImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public CredentialSet create() { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .create(resourceGroupName, registryName, credentialSetName, this.innerModel(), Context.NONE); - return this; - } - - public CredentialSet create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .create(resourceGroupName, registryName, credentialSetName, this.innerModel(), context); - return this; - } - - CredentialSetImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new CredentialSetInner(); - this.serviceManager = serviceManager; - this.credentialSetName = name; - } - - public CredentialSetImpl update() { - this.updateCredentialSetUpdateParameters = new CredentialSetUpdateParameters(); - return this; - } - - public CredentialSet apply() { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .update(resourceGroupName, registryName, credentialSetName, updateCredentialSetUpdateParameters, - Context.NONE); - return this; - } - - public CredentialSet apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .update(resourceGroupName, registryName, credentialSetName, updateCredentialSetUpdateParameters, context); - return this; - } - - CredentialSetImpl(CredentialSetInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.credentialSetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "credentialSets"); - } - - public CredentialSet refresh() { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE) - .getValue(); - return this; - } - - public CredentialSet refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCredentialSets() - .getWithResponse(resourceGroupName, registryName, credentialSetName, context) - .getValue(); - return this; - } - - public CredentialSetImpl withProperties(CredentialSetProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public CredentialSetImpl withIdentity(IdentityProperties identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateCredentialSetUpdateParameters.withIdentity(identity); - return this; - } - } - - public CredentialSetImpl withAuthCredentials(List authCredentials) { - this.updateCredentialSetUpdateParameters.withAuthCredentials(authCredentials); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java deleted file mode 100644 index cdbb9e7ac01c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java +++ /dev/null @@ -1,1005 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.CredentialSetsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters; -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 CredentialSetsClient. - */ -public final class CredentialSetsClientImpl implements CredentialSetsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CredentialSetsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of CredentialSetsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CredentialSetsClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(CredentialSetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientCredentialSets to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientCredentialSets") - public interface CredentialSetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CredentialSetInner credentialSetCreateParameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CredentialSetUpdateParameters credentialSetUpdateParameters, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified credential set resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, accept, context); - } - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified credential set resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String credentialSetName) { - return getWithResponseAsync(resourceGroupName, registryName, credentialSetName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String credentialSetName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, credentialSetName, context).block(); - } - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified credential set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName) { - return getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE).getValue(); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetInner credentialSetCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, - accept, credentialSetCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container registry along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetInner credentialSetCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetCreateParameters, - context); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CredentialSetInner> beginCreateAsync(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters) { - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, - credentialSetName, credentialSetCreateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CredentialSetInner.class, CredentialSetInner.class, this.client.getContext()); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CredentialSetInner> beginCreateAsync(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, - credentialSetName, credentialSetCreateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CredentialSetInner.class, CredentialSetInner.class, context); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters) { - return this.beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) - .getSyncPoller(); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CredentialSetInner> beginCreate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetInner credentialSetCreateParameters, - Context context) { - return this - .beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, - context) - .getSyncPoller(); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetInner credentialSetCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetInner credentialSetCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetInner credentialSetCreateParameters) { - return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters).block(); - } - - /** - * Creates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetCreateParameters The parameters for creating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialSetInner create(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetInner credentialSetCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context) - .block(); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, - accept, credentialSetUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container registry along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetUpdateParameters, - context); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CredentialSetInner> beginUpdateAsync(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, - credentialSetName, credentialSetUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CredentialSetInner.class, CredentialSetInner.class, this.client.getContext()); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CredentialSetInner> beginUpdateAsync(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, - credentialSetName, credentialSetUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CredentialSetInner.class, CredentialSetInner.class, context); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container - * registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CredentialSetInner> beginUpdate(String resourceGroupName, - String registryName, String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, - context) - .getSyncPoller(); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - String credentialSetName, CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetUpdateParameters credentialSetUpdateParameters) { - return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters).block(); - } - - /** - * Updates a credential set for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @param credentialSetUpdateParameters The parameters for updating a credential set. - * @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 an object that represents a credential set resource for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialSetInner update(String resourceGroupName, String registryName, String credentialSetName, - CredentialSetUpdateParameters credentialSetUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context) - .block(); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String credentialSetName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 registryName, - String credentialSetName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, context); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String credentialSetName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String credentialSetName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String credentialSetName) { - return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName).getSyncPoller(); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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> beginDelete(String resourceGroupName, String registryName, - String credentialSetName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context).getSyncPoller(); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String credentialSetName) { - return beginDeleteAsync(resourceGroupName, registryName, credentialSetName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 deleteAsync(String resourceGroupName, String registryName, String credentialSetName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String credentialSetName) { - deleteAsync(resourceGroupName, registryName, credentialSetName).block(); - } - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context) { - deleteAsync(resourceGroupName, registryName, credentialSetName, context).block(); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java deleted file mode 100644 index 0e62f50010f2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.CredentialSetsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSets; - -public final class CredentialSetsImpl implements CredentialSets { - private static final ClientLogger LOGGER = new ClientLogger(CredentialSetsImpl.class); - - private final CredentialSetsClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public CredentialSetsImpl(CredentialSetsClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String credentialSetName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, credentialSetName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CredentialSetImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CredentialSet get(String resourceGroupName, String registryName, String credentialSetName) { - CredentialSetInner inner = this.serviceClient().get(resourceGroupName, registryName, credentialSetName); - if (inner != null) { - return new CredentialSetImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String credentialSetName) { - this.serviceClient().delete(resourceGroupName, registryName, credentialSetName); - } - - public void delete(String resourceGroupName, String registryName, String credentialSetName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, credentialSetName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CredentialSetImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CredentialSetImpl(inner1, this.manager())); - } - - public CredentialSet getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); - if (credentialSetName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); - if (credentialSetName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, credentialSetName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); - if (credentialSetName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); - } - this.delete(resourceGroupName, registryName, credentialSetName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String credentialSetName = ResourceManagerUtils.getValueFromIdByName(id, "credentialSets"); - if (credentialSetName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'credentialSets'.", id))); - } - this.delete(resourceGroupName, registryName, credentialSetName, context); - } - - private CredentialSetsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public CredentialSetImpl define(String name) { - return new CredentialSetImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java deleted file mode 100644 index a06a8455c3b9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; -import com.azure.resourcemanager.containerregistry.generated.models.Event; -import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; -import com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage; - -public final class EventImpl implements Event { - private EventInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - EventImpl(EventInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public EventRequestMessage eventRequestMessage() { - return this.innerModel().eventRequestMessage(); - } - - public EventResponseMessage eventResponseMessage() { - return this.innerModel().eventResponseMessage(); - } - - public EventInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java deleted file mode 100644 index 76a54a1a21d0..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; -import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; - -public final class EventInfoImpl implements EventInfo { - private EventInfoInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - EventInfoImpl(EventInfoInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public EventInfoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java deleted file mode 100644 index c2f46f4bfe22..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; -import java.util.Collections; -import java.util.List; - -public final class GenerateCredentialsResultImpl implements GenerateCredentialsResult { - private GenerateCredentialsResultInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - GenerateCredentialsResultImpl(GenerateCredentialsResultInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String username() { - return this.innerModel().username(); - } - - public List passwords() { - List inner = this.innerModel().passwords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public GenerateCredentialsResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java deleted file mode 100644 index 45b1a3c8b873..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; -import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; - -public final class OperationDefinitionImpl implements OperationDefinition { - private OperationDefinitionInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - OperationDefinitionImpl(OperationDefinitionInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String origin() { - return this.innerModel().origin(); - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplayDefinition display() { - return this.innerModel().display(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationServiceSpecificationDefinition serviceSpecification() { - return this.innerModel().serviceSpecification(); - } - - public OperationDefinitionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java deleted file mode 100644 index 95d4e4b01755..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -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.PathParam; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ContainerRegistry/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws 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 result of a request to list container registry operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), 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 the operations for the provider. - * - * @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 result of a request to list container registry operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the operations for the provider. - * - * @throws 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 result of a request to list container registry operations as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List the operations for the provider. - * - * @throws 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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list container registry operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list container registry operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java deleted file mode 100644 index 38496d282323..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; -import com.azure.resourcemanager.containerregistry.generated.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index 7a808abe9140..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; - -public final class PrivateEndpointConnectionImpl - implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public PrivateEndpointConnectionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String privateEndpointConnectionName; - - public PrivateEndpointConnectionImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public PrivateEndpointConnection create() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), - Context.NONE); - return this; - } - - public PrivateEndpointConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), context); - return this; - } - - PrivateEndpointConnectionImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionInner(); - this.serviceManager = serviceManager; - this.privateEndpointConnectionName = name; - } - - public PrivateEndpointConnectionImpl update() { - return this; - } - - public PrivateEndpointConnection apply() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), - Context.NONE); - return this; - } - - public PrivateEndpointConnection apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, registryName, privateEndpointConnectionName, this.innerModel(), context); - return this; - } - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionImpl withProperties(PrivateEndpointConnectionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index ccb6d663f2e6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,793 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.PathParam; -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.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult; -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 PrivateEndpointConnectionsClient. - */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateEndpointConnectionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(ContainerRegistryManagementClientImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientPrivateEndpointConnections to be - * used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientPrivateEndpointConnections") - public interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 specified private endpoint connection associated with the container registry along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, String privateEndpointConnectionName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, String privateEndpointConnectionName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, accept, context); - } - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 specified private endpoint connection associated with the container registry on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).block(); - } - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 specified private endpoint connection associated with the container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String registryName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE).getValue(); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a private endpoint connection for a container registry along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, - contentType, accept, privateEndpointConnection, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a container registry along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, - contentType, accept, privateEndpointConnection, context); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, - privateEndpointConnectionName, privateEndpointConnection); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - this.client.getContext()); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, - privateEndpointConnectionName, privateEndpointConnection, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - context); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection) - .getSyncPoller(); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a - * container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection, context) - .getSyncPoller(); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a private endpoint connection for a container registry on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a container registry on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a private endpoint connection for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return createOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection).block(); - } - - /** - * Update the state of specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The parameters for creating a private endpoint connection. - * @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 an object that represents a private endpoint connection for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String registryName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, - Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection, context).block(); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String privateEndpointConnectionName) { - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 registryName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, context); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, privateEndpointConnectionName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String privateEndpointConnectionName) { - return this.beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).getSyncPoller(); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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> beginDelete(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context) - .getSyncPoller(); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 deleteAsync(String resourceGroupName, String registryName, String privateEndpointConnectionName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, registryName, privateEndpointConnectionName).block(); - } - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, - Context context) { - deleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).block(); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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 private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 89825ff02ab4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnections; - -public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); - - private final PrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateEndpointConnection get(String resourceGroupName, String registryName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner - = this.serviceClient().get(resourceGroupName, registryName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, registryName, privateEndpointConnectionName); - } - - public void delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, privateEndpointConnectionName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, privateEndpointConnectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.delete(resourceGroupName, registryName, privateEndpointConnectionName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.delete(resourceGroupName, registryName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionImpl define(String name) { - return new PrivateEndpointConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java deleted file mode 100644 index 9ef5ac6bc82d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; - -public final class PrivateLinkResourceImpl implements PrivateLinkResource { - private PrivateLinkResourceInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public PrivateLinkResourceProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateLinkResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java deleted file mode 100644 index 8d2d98df7ff1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java +++ /dev/null @@ -1,2200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.RegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; -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 RegistriesClient. - */ -public final class RegistriesClientImpl implements RegistriesClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistriesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of RegistriesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistriesClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientRegistries to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientRegistries") - public interface RegistriesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegistryInner registry, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegistryUpdateParameters registryUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importImage(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Content-Type") String contentType, - @BodyParam("application/json") ImportImageParameters parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listUsages(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredentials(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateCredential(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegenerateCredentialParameters regenerateCredentialParameters, - Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> generateCredentials(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GenerateCredentialsParameters generateCredentialsParameters, - Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegistryNameCheckRequest registryNameCheckRequest, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPrivateLinkResource(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPrivateLinkResources(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPrivateLinkResourcesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - RegistryInner registry) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, registry, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - RegistryInner registry, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, contentType, accept, registry, context); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, - String registryName, RegistryInner registry) { - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, registry); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, - String registryName, RegistryInner registry, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, registry, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreate(String resourceGroupName, - String registryName, RegistryInner registry) { - return this.beginCreateAsync(resourceGroupName, registryName, registry).getSyncPoller(); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreate(String resourceGroupName, - String registryName, RegistryInner registry, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, registry, context).getSyncPoller(); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, RegistryInner registry) { - return beginCreateAsync(resourceGroupName, registryName, registry).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, RegistryInner registry, - Context context) { - return beginCreateAsync(resourceGroupName, registryName, registry, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry) { - return createAsync(resourceGroupName, registryName, registry).block(); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner create(String resourceGroupName, String registryName, RegistryInner registry, - Context context) { - return createAsync(resourceGroupName, registryName, registry, context).block(); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, - registryUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, contentType, accept, registryUpdateParameters, context); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginUpdateAsync(String resourceGroupName, - String registryName, RegistryUpdateParameters registryUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, registryUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginUpdateAsync(String resourceGroupName, - String registryName, RegistryUpdateParameters registryUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, registryUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, - String registryName, RegistryUpdateParameters registryUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters).getSyncPoller(); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginUpdate(String resourceGroupName, - String registryName, RegistryUpdateParameters registryUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, registryUpdateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner update(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters) { - return updateAsync(resourceGroupName, registryName, registryUpdateParameters).block(); - } - - /** - * Updates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registryUpdateParameters The parameters for updating a container registry. - * @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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner update(String resourceGroupName, String registryName, - RegistryUpdateParameters registryUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, registryUpdateParameters, context).block(); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 registryName, - Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, context); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName) { - return this.beginDeleteAsync(resourceGroupName, registryName).getSyncPoller(); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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> beginDelete(String resourceGroupName, String registryName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, context).getSyncPoller(); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName) { - return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 deleteAsync(String resourceGroupName, String registryName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName) { - deleteAsync(resourceGroupName, registryName).block(); - } - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 delete(String resourceGroupName, String registryName, Context context) { - deleteAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, 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())); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), 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())); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @throws 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 result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @throws 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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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>> importImageWithResponseAsync(String resourceGroupName, String registryName, - ImportImageParameters parameters) { - final String contentType = "application/json"; - return FluxUtil - .withContext(context -> service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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>> importImageWithResponseAsync(String resourceGroupName, String registryName, - ImportImageParameters parameters, Context context) { - final String contentType = "application/json"; - context = this.client.mergeContext(context); - return service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginImportImageAsync(String resourceGroupName, String registryName, - ImportImageParameters parameters) { - Mono>> mono - = importImageWithResponseAsync(resourceGroupName, registryName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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> beginImportImageAsync(String resourceGroupName, String registryName, - ImportImageParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = importImageWithResponseAsync(resourceGroupName, registryName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginImportImage(String resourceGroupName, String registryName, - ImportImageParameters parameters) { - return this.beginImportImageAsync(resourceGroupName, registryName, parameters).getSyncPoller(); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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> beginImportImage(String resourceGroupName, String registryName, - ImportImageParameters parameters, Context context) { - return this.beginImportImageAsync(resourceGroupName, registryName, parameters, context).getSyncPoller(); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 importImageAsync(String resourceGroupName, String registryName, - ImportImageParameters parameters) { - return beginImportImageAsync(resourceGroupName, registryName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImageAsync(String resourceGroupName, String registryName, ImportImageParameters parameters, - Context context) { - return beginImportImageAsync(resourceGroupName, registryName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { - importImageAsync(resourceGroupName, registryName, parameters).block(); - } - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, - Context context) { - importImageAsync(resourceGroupName, registryName, parameters, context).block(); - } - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 quota usages for the specified container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUsagesWithResponseAsync(String resourceGroupName, - String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUsagesWithResponseAsync(String resourceGroupName, - String registryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); - } - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 quota usages for the specified container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listUsagesAsync(String resourceGroupName, String registryName) { - return listUsagesWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context) { - return listUsagesWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 quota usages for the specified container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { - return listUsagesWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listCredentialsWithResponseAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listCredentialsWithResponseAsync(String resourceGroupName, String registryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); - } - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCredentialsAsync(String resourceGroupName, - String registryName) { - return listCredentialsWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 from the ListCredentials operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCredentialsWithResponse(String resourceGroupName, - String registryName, Context context) { - return listCredentialsWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName) { - return listCredentialsWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regenerateCredentialWithResponseAsync( - String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, - regenerateCredentialParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regenerateCredentialWithResponseAsync( - String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters, - Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, - regenerateCredentialParameters, context); - } - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateCredentialAsync(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { - return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 from the ListCredentials operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { - return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters, - context).block(); - } - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 from the ListCredentials operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters) { - return regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, - Context.NONE).getValue(); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, - String registryName, GenerateCredentialsParameters generateCredentialsParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, - generateCredentialsParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, - String registryName, GenerateCredentialsParameters generateCredentialsParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, - generateCredentialsParameters, context); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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, GenerateCredentialsResultInner> - beginGenerateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - Mono>> mono - = generateCredentialsWithResponseAsync(resourceGroupName, registryName, generateCredentialsParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, - this.client.getContext()); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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, GenerateCredentialsResultInner> - beginGenerateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = generateCredentialsWithResponseAsync(resourceGroupName, registryName, - generateCredentialsParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, - context); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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, GenerateCredentialsResultInner> - beginGenerateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return this.beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters) - .getSyncPoller(); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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, GenerateCredentialsResultInner> - beginGenerateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return this - .beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .getSyncPoller(); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).block(); - } - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .block(); - } - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to check the availability of a container registry name along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context); - } - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to check the availability of a container registry name on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono - checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest) { - return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response - checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { - return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest, context).block(); - } - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to check the availability of a container registry name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { - return checkNameAvailabilityWithResponse(registryNameCheckRequest, Context.NONE).getValue(); - } - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPrivateLinkResourceWithResponseAsync(String resourceGroupName, - String registryName, String groupName) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPrivateLinkResourceWithResponseAsync(String resourceGroupName, - String registryName, String groupName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context); - } - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPrivateLinkResourceAsync(String resourceGroupName, String registryName, - String groupName) { - return getPrivateLinkResourceWithResponseAsync(resourceGroupName, registryName, groupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPrivateLinkResourceWithResponse(String resourceGroupName, - String registryName, String groupName, Context context) { - return getPrivateLinkResourceWithResponseAsync(resourceGroupName, registryName, groupName, context).block(); - } - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, String registryName, - String groupName) { - return getPrivateLinkResourceWithResponse(resourceGroupName, registryName, groupName, Context.NONE).getValue(); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, - String registryName) { - return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName), - nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink)); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, - String registryName, Context context) { - return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateLinkResources(String resourceGroupName, - String registryName) { - return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName)); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateLinkResources(String resourceGroupName, - String registryName, Context context) { - return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(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. - * @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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPrivateLinkResourcesNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listPrivateLinkResourcesNext(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. - * @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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPrivateLinkResourcesNextSinglePageAsync(String nextLink, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listPrivateLinkResourcesNext(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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java deleted file mode 100644 index da1e309d3292..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.RegistriesClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; -import com.azure.resourcemanager.containerregistry.generated.models.Registries; -import com.azure.resourcemanager.containerregistry.generated.models.Registry; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; - -public final class RegistriesImpl implements Registries { - private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class); - - private final RegistriesClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public RegistriesImpl(RegistriesClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Registry getByResourceGroup(String resourceGroupName, String registryName) { - RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); - if (inner != null) { - return new RegistryImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String registryName) { - this.serviceClient().delete(resourceGroupName, registryName); - } - - public void delete(String resourceGroupName, String registryName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters) { - this.serviceClient().importImage(resourceGroupName, registryName, parameters); - } - - public void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, - Context context) { - this.serviceClient().importImage(resourceGroupName, registryName, parameters, context); - } - - public Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context) { - Response inner - = this.serviceClient().listUsagesWithResponse(resourceGroupName, registryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryUsageListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RegistryUsageListResult listUsages(String resourceGroupName, String registryName) { - RegistryUsageListResultInner inner = this.serviceClient().listUsages(resourceGroupName, registryName); - if (inner != null) { - return new RegistryUsageListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listCredentialsWithResponse(String resourceGroupName, - String registryName, Context context) { - Response inner - = this.serviceClient().listCredentialsWithResponse(resourceGroupName, registryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryListCredentialsResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RegistryListCredentialsResult listCredentials(String resourceGroupName, String registryName) { - RegistryListCredentialsResultInner inner - = this.serviceClient().listCredentials(resourceGroupName, registryName); - if (inner != null) { - return new RegistryListCredentialsResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { - Response inner = this.serviceClient() - .regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryListCredentialsResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RegistryListCredentialsResult regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters) { - RegistryListCredentialsResultInner inner = this.serviceClient() - .regenerateCredential(resourceGroupName, registryName, regenerateCredentialParameters); - if (inner != null) { - return new RegistryListCredentialsResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - GenerateCredentialsResultInner inner - = this.serviceClient().generateCredentials(resourceGroupName, registryName, generateCredentialsParameters); - if (inner != null) { - return new GenerateCredentialsResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - GenerateCredentialsResultInner inner = this.serviceClient() - .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters, context); - if (inner != null) { - return new GenerateCredentialsResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response - checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { - Response inner - = this.serviceClient().checkNameAvailabilityWithResponse(registryNameCheckRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryNameStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RegistryNameStatus checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { - RegistryNameStatusInner inner = this.serviceClient().checkNameAvailability(registryNameCheckRequest); - if (inner != null) { - return new RegistryNameStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getPrivateLinkResourceWithResponse(String resourceGroupName, - String registryName, String groupName, Context context) { - Response inner = this.serviceClient() - .getPrivateLinkResourceWithResponse(resourceGroupName, registryName, groupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateLinkResource getPrivateLinkResource(String resourceGroupName, String registryName, String groupName) { - PrivateLinkResourceInner inner - = this.serviceClient().getPrivateLinkResource(resourceGroupName, registryName, groupName); - if (inner != null) { - return new PrivateLinkResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName) { - PagedIterable inner - = this.serviceClient().listPrivateLinkResources(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, - Context context) { - PagedIterable inner - = this.serviceClient().listPrivateLinkResources(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public Registry getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, registryName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - this.delete(resourceGroupName, registryName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - this.delete(resourceGroupName, registryName, context); - } - - private RegistriesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public RegistryImpl define(String name) { - return new RegistryImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java deleted file mode 100644 index aec4397c0d29..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions; -import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; -import com.azure.resourcemanager.containerregistry.generated.models.Policies; -import com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; -import com.azure.resourcemanager.containerregistry.generated.models.Registry; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class RegistryImpl implements Registry, Registry.Definition, Registry.Update { - private RegistryInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 RegistryProperties properties() { - return this.innerModel().properties(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public IdentityProperties identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public RegistryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private RegistryUpdateParameters updateRegistryUpdateParameters; - - public RegistryImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Registry create() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .create(resourceGroupName, registryName, this.innerModel(), Context.NONE); - return this; - } - - public Registry create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .create(resourceGroupName, registryName, this.innerModel(), context); - return this; - } - - RegistryImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new RegistryInner(); - this.serviceManager = serviceManager; - this.registryName = name; - } - - public RegistryImpl update() { - this.updateRegistryUpdateParameters = new RegistryUpdateParameters(); - return this; - } - - public Registry apply() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .update(resourceGroupName, registryName, updateRegistryUpdateParameters, Context.NONE); - return this; - } - - public Registry apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .update(resourceGroupName, registryName, updateRegistryUpdateParameters, context); - return this; - } - - RegistryImpl(RegistryInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - } - - public Registry refresh() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE) - .getValue(); - return this; - } - - public Registry refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .getByResourceGroupWithResponse(resourceGroupName, registryName, context) - .getValue(); - return this; - } - - public void importImage(ImportImageParameters parameters) { - serviceManager.registries().importImage(resourceGroupName, registryName, parameters); - } - - public void importImage(ImportImageParameters parameters, Context context) { - serviceManager.registries().importImage(resourceGroupName, registryName, parameters, context); - } - - public Response listCredentialsWithResponse(Context context) { - return serviceManager.registries().listCredentialsWithResponse(resourceGroupName, registryName, context); - } - - public RegistryListCredentialsResult listCredentials() { - return serviceManager.registries().listCredentials(resourceGroupName, registryName); - } - - public Response regenerateCredentialWithResponse( - RegenerateCredentialParameters regenerateCredentialParameters, Context context) { - return serviceManager.registries() - .regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, context); - } - - public RegistryListCredentialsResult - regenerateCredential(RegenerateCredentialParameters regenerateCredentialParameters) { - return serviceManager.registries() - .regenerateCredential(resourceGroupName, registryName, regenerateCredentialParameters); - } - - public GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters) { - return serviceManager.registries() - .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters); - } - - public GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters, - Context context) { - return serviceManager.registries() - .generateCredentials(resourceGroupName, registryName, generateCredentialsParameters, context); - } - - public RegistryImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public RegistryImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public RegistryImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateRegistryUpdateParameters.withSku(sku); - return this; - } - } - - public RegistryImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateRegistryUpdateParameters.withTags(tags); - return this; - } - } - - public RegistryImpl withProperties(RegistryProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public RegistryImpl withIdentity(IdentityProperties identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateRegistryUpdateParameters.withIdentity(identity); - return this; - } - } - - public RegistryImpl withAdminUserEnabled(Boolean adminUserEnabled) { - this.updateRegistryUpdateParameters.withAdminUserEnabled(adminUserEnabled); - return this; - } - - public RegistryImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { - this.updateRegistryUpdateParameters.withNetworkRuleSet(networkRuleSet); - return this; - } - - public RegistryImpl withPolicies(Policies policies) { - this.updateRegistryUpdateParameters.withPolicies(policies); - return this; - } - - public RegistryImpl withEncryption(EncryptionProperty encryption) { - this.updateRegistryUpdateParameters.withEncryption(encryption); - return this; - } - - public RegistryImpl withDataEndpointEnabled(Boolean dataEndpointEnabled) { - this.updateRegistryUpdateParameters.withDataEndpointEnabled(dataEndpointEnabled); - return this; - } - - public RegistryImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.updateRegistryUpdateParameters.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - public RegistryImpl withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { - this.updateRegistryUpdateParameters.withNetworkRuleBypassOptions(networkRuleBypassOptions); - return this; - } - - public RegistryImpl withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { - this.updateRegistryUpdateParameters.withNetworkRuleBypassAllowedForTasks(networkRuleBypassAllowedForTasks); - return this; - } - - public RegistryImpl withAnonymousPullEnabled(Boolean anonymousPullEnabled) { - this.updateRegistryUpdateParameters.withAnonymousPullEnabled(anonymousPullEnabled); - return this; - } - - public RegistryImpl withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { - this.updateRegistryUpdateParameters.withRoleAssignmentMode(roleAssignmentMode); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java deleted file mode 100644 index e393fa686ce8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryListCredentialsResult; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; -import java.util.Collections; -import java.util.List; - -public final class RegistryListCredentialsResultImpl implements RegistryListCredentialsResult { - private RegistryListCredentialsResultInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - RegistryListCredentialsResultImpl(RegistryListCredentialsResultInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String username() { - return this.innerModel().username(); - } - - public List passwords() { - List inner = this.innerModel().passwords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RegistryListCredentialsResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java deleted file mode 100644 index 777e9a0d0ac6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; - -public final class RegistryNameStatusImpl implements RegistryNameStatus { - private RegistryNameStatusInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - RegistryNameStatusImpl(RegistryNameStatusInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public String reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public RegistryNameStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java deleted file mode 100644 index fb79818103b1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; -import java.util.Collections; -import java.util.List; - -public final class RegistryUsageListResultImpl implements RegistryUsageListResult { - private RegistryUsageListResultInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - RegistryUsageListResultImpl(RegistryUsageListResultInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RegistryUsageListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java deleted file mode 100644 index 3c40b8689ce9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; -import java.util.Collections; -import java.util.Map; - -public final class ReplicationImpl implements Replication, Replication.Definition, Replication.Update { - private ReplicationInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 ReplicationProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ReplicationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String replicationName; - - private ReplicationUpdateParameters updateReplicationUpdateParameters; - - public ReplicationImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public Replication create() { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .create(resourceGroupName, registryName, replicationName, this.innerModel(), Context.NONE); - return this; - } - - public Replication create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .create(resourceGroupName, registryName, replicationName, this.innerModel(), context); - return this; - } - - ReplicationImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new ReplicationInner(); - this.serviceManager = serviceManager; - this.replicationName = name; - } - - public ReplicationImpl update() { - this.updateReplicationUpdateParameters = new ReplicationUpdateParameters(); - return this; - } - - public Replication apply() { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .update(resourceGroupName, registryName, replicationName, updateReplicationUpdateParameters, Context.NONE); - return this; - } - - public Replication apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .update(resourceGroupName, registryName, replicationName, updateReplicationUpdateParameters, context); - return this; - } - - ReplicationImpl(ReplicationInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.replicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replications"); - } - - public Replication refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE) - .getValue(); - return this; - } - - public Replication refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplications() - .getWithResponse(resourceGroupName, registryName, replicationName, context) - .getValue(); - return this; - } - - public ReplicationImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ReplicationImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ReplicationImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateReplicationUpdateParameters.withTags(tags); - return this; - } - } - - public ReplicationImpl withProperties(ReplicationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ReplicationImpl withRegionEndpointEnabled(Boolean regionEndpointEnabled) { - this.updateReplicationUpdateParameters.withRegionEndpointEnabled(regionEndpointEnabled); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java deleted file mode 100644 index f1bf069044e4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java +++ /dev/null @@ -1,987 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.ReplicationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; -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 ReplicationsClient. - */ -public final class ReplicationsClientImpl implements ReplicationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationsClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(ReplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientReplications to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientReplications") - public interface ReplicationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ReplicationInner replication, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ReplicationUpdateParameters replicationUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified replication along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String replicationName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String replicationName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, accept, context); - } - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified replication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String replicationName) { - return getWithResponseAsync(resourceGroupName, registryName, replicationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String replicationName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, replicationName, context).block(); - } - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationInner get(String resourceGroupName, String registryName, String replicationName) { - return getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE).getValue(); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String replicationName, ReplicationInner replication) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, - replication, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String replicationName, ReplicationInner replication, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, contentType, accept, replication, context); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationInner> beginCreateAsync(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, replicationName, replication); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationInner.class, ReplicationInner.class, this.client.getContext()); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationInner> beginCreateAsync(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, replicationName, replication, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationInner.class, ReplicationInner.class, context); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication) { - return this.beginCreateAsync(resourceGroupName, registryName, replicationName, replication).getSyncPoller(); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationInner> beginCreate(String resourceGroupName, - String registryName, String replicationName, ReplicationInner replication, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, replicationName, replication, context) - .getSyncPoller(); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication) { - return beginCreateAsync(resourceGroupName, registryName, replicationName, replication).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication, Context context) { - return beginCreateAsync(resourceGroupName, registryName, replicationName, replication, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationInner create(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication) { - return createAsync(resourceGroupName, registryName, replicationName, replication).block(); - } - - /** - * Creates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replication The parameters for creating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationInner create(String resourceGroupName, String registryName, String replicationName, - ReplicationInner replication, Context context) { - return createAsync(resourceGroupName, registryName, replicationName, replication, context).block(); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, - replicationUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String replicationName, ReplicationUpdateParameters replicationUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, contentType, accept, replicationUpdateParameters, - context); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationInner> beginUpdateAsync(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationInner.class, ReplicationInner.class, this.client.getContext()); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationInner> beginUpdateAsync(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, registryName, - replicationName, replicationUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationInner.class, ReplicationInner.class, context); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationInner> beginUpdate(String resourceGroupName, - String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationInner update(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters) { - return updateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters).block(); - } - - /** - * Updates a replication for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @param replicationUpdateParameters The parameters for updating a replication. - * @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 an object that represents a replication for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationInner update(String resourceGroupName, String registryName, String replicationName, - ReplicationUpdateParameters replicationUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, replicationName, replicationUpdateParameters, context) - .block(); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String replicationName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 registryName, - String replicationName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, context); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String replicationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, replicationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String replicationName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, replicationName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String replicationName) { - return this.beginDeleteAsync(resourceGroupName, registryName, replicationName).getSyncPoller(); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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> beginDelete(String resourceGroupName, String registryName, - String replicationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, replicationName, context).getSyncPoller(); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String replicationName) { - return beginDeleteAsync(resourceGroupName, registryName, replicationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 deleteAsync(String resourceGroupName, String registryName, String replicationName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, replicationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String replicationName) { - deleteAsync(resourceGroupName, registryName, replicationName).block(); - } - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context) { - deleteAsync(resourceGroupName, registryName, replicationName, context).block(); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java deleted file mode 100644 index b05c7b189bab..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ReplicationsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import com.azure.resourcemanager.containerregistry.generated.models.Replications; - -public final class ReplicationsImpl implements Replications { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationsImpl.class); - - private final ReplicationsClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public ReplicationsImpl(ReplicationsClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, String replicationName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, replicationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Replication get(String resourceGroupName, String registryName, String replicationName) { - ReplicationInner inner = this.serviceClient().get(resourceGroupName, registryName, replicationName); - if (inner != null) { - return new ReplicationImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String replicationName) { - this.serviceClient().delete(resourceGroupName, registryName, replicationName); - } - - public void delete(String resourceGroupName, String registryName, String replicationName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, replicationName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); - } - - public Replication getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); - if (replicationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, replicationName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); - if (replicationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, replicationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); - if (replicationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); - } - this.delete(resourceGroupName, registryName, replicationName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String replicationName = ResourceManagerUtils.getValueFromIdByName(id, "replications"); - if (replicationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replications'.", id))); - } - this.delete(resourceGroupName, registryName, replicationName, context); - } - - private ReplicationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public ReplicationImpl define(String name) { - return new ReplicationImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java deleted file mode 100644 index 728b711a62db..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -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.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java deleted file mode 100644 index f306723775ad..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; -import java.util.List; - -public final class ScopeMapImpl implements ScopeMap, ScopeMap.Definition, ScopeMap.Update { - private ScopeMapInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScopeMapProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScopeMapInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String scopeMapName; - - private ScopeMapUpdateParameters updateScopeMapUpdateParameters; - - public ScopeMapImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public ScopeMap create() { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .create(resourceGroupName, registryName, scopeMapName, this.innerModel(), Context.NONE); - return this; - } - - public ScopeMap create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .create(resourceGroupName, registryName, scopeMapName, this.innerModel(), context); - return this; - } - - ScopeMapImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new ScopeMapInner(); - this.serviceManager = serviceManager; - this.scopeMapName = name; - } - - public ScopeMapImpl update() { - this.updateScopeMapUpdateParameters = new ScopeMapUpdateParameters(); - return this; - } - - public ScopeMap apply() { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .update(resourceGroupName, registryName, scopeMapName, updateScopeMapUpdateParameters, Context.NONE); - return this; - } - - public ScopeMap apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .update(resourceGroupName, registryName, scopeMapName, updateScopeMapUpdateParameters, context); - return this; - } - - ScopeMapImpl(ScopeMapInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.scopeMapName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scopeMaps"); - } - - public ScopeMap refresh() { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE) - .getValue(); - return this; - } - - public ScopeMap refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScopeMaps() - .getWithResponse(resourceGroupName, registryName, scopeMapName, context) - .getValue(); - return this; - } - - public ScopeMapImpl withProperties(ScopeMapProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ScopeMapImpl withDescription(String description) { - this.updateScopeMapUpdateParameters.withDescription(description); - return this; - } - - public ScopeMapImpl withActions(List actions) { - this.updateScopeMapUpdateParameters.withActions(actions); - return this; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java deleted file mode 100644 index a2e8e281daf1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java +++ /dev/null @@ -1,976 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.ScopeMapsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; -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 ScopeMapsClient. - */ -public final class ScopeMapsClientImpl implements ScopeMapsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ScopeMapsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of ScopeMapsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ScopeMapsClientImpl(ContainerRegistryManagementClientImpl client) { - this.service - = RestProxy.create(ScopeMapsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientScopeMaps to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientScopeMaps") - public interface ScopeMapsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ScopeMapInner scopeMapCreateParameters, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified scope map along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, accept, context); - } - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified scope map on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String scopeMapName) { - return getWithResponseAsync(resourceGroupName, registryName, scopeMapName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, scopeMapName, context).block(); - } - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified scope map. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScopeMapInner get(String resourceGroupName, String registryName, String scopeMapName) { - return getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE).getValue(); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapInner scopeMapCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, - scopeMapCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapCreateParameters, context); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScopeMapInner> beginCreateAsync(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScopeMapInner.class, ScopeMapInner.class, this.client.getContext()); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScopeMapInner> beginCreateAsync(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScopeMapInner.class, ScopeMapInner.class, context); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters) { - return this.beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters) - .getSyncPoller(); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScopeMapInner> beginCreate(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapInner scopeMapCreateParameters, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context) - .getSyncPoller(); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters) { - return createAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters).block(); - } - - /** - * Creates a scope map for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapCreateParameters The parameters for creating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScopeMapInner create(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapInner scopeMapCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, context).block(); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, - scopeMapUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapUpdateParameters, context); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScopeMapInner> beginUpdateAsync(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScopeMapInner.class, ScopeMapInner.class, this.client.getContext()); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScopeMapInner> beginUpdateAsync(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScopeMapInner.class, ScopeMapInner.class, context); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScopeMapInner> beginUpdate(String resourceGroupName, - String registryName, String scopeMapName, ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters) { - return updateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters).block(); - } - - /** - * Updates a scope map with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @param scopeMapUpdateParameters The parameters for updating a scope map. - * @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 an object that represents a scope map for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScopeMapInner update(String resourceGroupName, String registryName, String scopeMapName, - ScopeMapUpdateParameters scopeMapUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, context).block(); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String scopeMapName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 registryName, - String scopeMapName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, context); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String scopeMapName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, scopeMapName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String scopeMapName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, scopeMapName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String scopeMapName) { - return this.beginDeleteAsync(resourceGroupName, registryName, scopeMapName).getSyncPoller(); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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> beginDelete(String resourceGroupName, String registryName, - String scopeMapName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, scopeMapName, context).getSyncPoller(); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String scopeMapName) { - return beginDeleteAsync(resourceGroupName, registryName, scopeMapName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 deleteAsync(String resourceGroupName, String registryName, String scopeMapName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, scopeMapName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String scopeMapName) { - deleteAsync(resourceGroupName, registryName, scopeMapName).block(); - } - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context) { - deleteAsync(resourceGroupName, registryName, scopeMapName, context).block(); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java deleted file mode 100644 index 9a9bd14d382b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.ScopeMapsClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMaps; - -public final class ScopeMapsImpl implements ScopeMaps { - private static final ClientLogger LOGGER = new ClientLogger(ScopeMapsImpl.class); - - private final ScopeMapsClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public ScopeMapsImpl(ScopeMapsClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, scopeMapName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScopeMapImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ScopeMap get(String resourceGroupName, String registryName, String scopeMapName) { - ScopeMapInner inner = this.serviceClient().get(resourceGroupName, registryName, scopeMapName); - if (inner != null) { - return new ScopeMapImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String scopeMapName) { - this.serviceClient().delete(resourceGroupName, registryName, scopeMapName); - } - - public void delete(String resourceGroupName, String registryName, String scopeMapName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, scopeMapName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScopeMapImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScopeMapImpl(inner1, this.manager())); - } - - public ScopeMap getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); - if (scopeMapName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, scopeMapName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); - if (scopeMapName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, scopeMapName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); - if (scopeMapName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); - } - this.delete(resourceGroupName, registryName, scopeMapName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String scopeMapName = ResourceManagerUtils.getValueFromIdByName(id, "scopeMaps"); - if (scopeMapName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scopeMaps'.", id))); - } - this.delete(resourceGroupName, registryName, scopeMapName, context); - } - - private ScopeMapsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public ScopeMapImpl define(String name) { - return new ScopeMapImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java deleted file mode 100644 index ae0e0d6aeb6a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; -import com.azure.resourcemanager.containerregistry.generated.models.Token; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; -import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; - -public final class TokenImpl implements Token, Token.Definition, Token.Update { - private TokenInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public TokenProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public TokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String tokenName; - - private TokenUpdateParameters updateTokenUpdateParameters; - - public TokenImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public Token create() { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .create(resourceGroupName, registryName, tokenName, this.innerModel(), Context.NONE); - return this; - } - - public Token create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .create(resourceGroupName, registryName, tokenName, this.innerModel(), context); - return this; - } - - TokenImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = new TokenInner(); - this.serviceManager = serviceManager; - this.tokenName = name; - } - - public TokenImpl update() { - this.updateTokenUpdateParameters = new TokenUpdateParameters(); - return this; - } - - public Token apply() { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .update(resourceGroupName, registryName, tokenName, updateTokenUpdateParameters, Context.NONE); - return this; - } - - public Token apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .update(resourceGroupName, registryName, tokenName, updateTokenUpdateParameters, context); - return this; - } - - TokenImpl(TokenInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.tokenName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "tokens"); - } - - public Token refresh() { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE) - .getValue(); - return this; - } - - public Token refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getTokens() - .getWithResponse(resourceGroupName, registryName, tokenName, context) - .getValue(); - return this; - } - - public TokenImpl withProperties(TokenProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public TokenImpl withScopeMapId(String scopeMapId) { - this.updateTokenUpdateParameters.withScopeMapId(scopeMapId); - return this; - } - - public TokenImpl withStatus(TokenStatus status) { - this.updateTokenUpdateParameters.withStatus(status); - return this; - } - - public TokenImpl withCredentials(TokenCredentialsProperties credentials) { - this.updateTokenUpdateParameters.withCredentials(credentials); - return this; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java deleted file mode 100644 index d6306afb628d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java +++ /dev/null @@ -1,972 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.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.containerregistry.generated.fluent.TokensClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult; -import com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters; -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 TokensClient. - */ -public final class TokensClientImpl implements TokensClient { - /** - * The proxy service used to perform REST calls. - */ - private final TokensService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of TokensClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TokensClientImpl(ContainerRegistryManagementClientImpl client) { - this.service = RestProxy.create(TokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientTokens to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientTokens") - public interface TokensService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") TokenInner tokenCreateParameters, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") TokenUpdateParameters tokenUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified token along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String tokenName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String tokenName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, accept, context); - } - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified token on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String tokenName) { - return getWithResponseAsync(resourceGroupName, registryName, tokenName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String tokenName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, tokenName, context).block(); - } - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TokenInner get(String resourceGroupName, String registryName, String tokenName) { - return getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE).getValue(); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, - tokenCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, contentType, accept, tokenCreateParameters, context); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TokenInner> beginCreateAsync(String resourceGroupName, - String registryName, String tokenName, TokenInner tokenCreateParameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, - TokenInner.class, this.client.getContext()); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TokenInner> beginCreateAsync(String resourceGroupName, - String registryName, String tokenName, TokenInner tokenCreateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, - TokenInner.class, context); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters) { - return this.beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).getSyncPoller(); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TokenInner> beginCreate(String resourceGroupName, String registryName, - String tokenName, TokenInner tokenCreateParameters, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context) - .getSyncPoller(); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String tokenName, - TokenInner tokenCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String tokenName, - TokenInner tokenCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TokenInner create(String resourceGroupName, String registryName, String tokenName, - TokenInner tokenCreateParameters) { - return createAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters).block(); - } - - /** - * Creates a token for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenCreateParameters The parameters for creating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TokenInner create(String resourceGroupName, String registryName, String tokenName, - TokenInner tokenCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, tokenName, tokenCreateParameters, context).block(); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, - tokenUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, contentType, accept, tokenUpdateParameters, context); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TokenInner> beginUpdateAsync(String resourceGroupName, - String registryName, String tokenName, TokenUpdateParameters tokenUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, - TokenInner.class, this.client.getContext()); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TokenInner> beginUpdateAsync(String resourceGroupName, - String registryName, String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), TokenInner.class, - TokenInner.class, context); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).getSyncPoller(); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TokenInner> beginUpdate(String resourceGroupName, String registryName, - String tokenName, TokenUpdateParameters tokenUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TokenInner update(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters) { - return updateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).block(); - } - - /** - * Updates a token with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @param tokenUpdateParameters The parameters for updating a token. - * @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 an object that represents a token for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TokenInner update(String resourceGroupName, String registryName, String tokenName, - TokenUpdateParameters tokenUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, context).block(); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String tokenName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 registryName, - String tokenName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, context); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String tokenName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, tokenName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String tokenName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, tokenName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String tokenName) { - return this.beginDeleteAsync(resourceGroupName, registryName, tokenName).getSyncPoller(); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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> beginDelete(String resourceGroupName, String registryName, - String tokenName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, tokenName, context).getSyncPoller(); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String tokenName) { - return beginDeleteAsync(resourceGroupName, registryName, tokenName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 deleteAsync(String resourceGroupName, String registryName, String tokenName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, tokenName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String tokenName) { - deleteAsync(resourceGroupName, registryName, tokenName).block(); - } - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context) { - deleteAsync(resourceGroupName, registryName, tokenName, context).block(); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java deleted file mode 100644 index 23f820ce90ad..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.TokensClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; -import com.azure.resourcemanager.containerregistry.generated.models.Token; -import com.azure.resourcemanager.containerregistry.generated.models.Tokens; - -public final class TokensImpl implements Tokens { - private static final ClientLogger LOGGER = new ClientLogger(TokensImpl.class); - - private final TokensClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public TokensImpl(TokensClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, String tokenName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, tokenName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Token get(String resourceGroupName, String registryName, String tokenName) { - TokenInner inner = this.serviceClient().get(resourceGroupName, registryName, tokenName); - if (inner != null) { - return new TokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String tokenName) { - this.serviceClient().delete(resourceGroupName, registryName, tokenName); - } - - public void delete(String resourceGroupName, String registryName, String tokenName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, tokenName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TokenImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TokenImpl(inner1, this.manager())); - } - - public Token getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); - if (tokenName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, tokenName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); - if (tokenName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, tokenName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); - if (tokenName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); - } - this.delete(resourceGroupName, registryName, tokenName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String tokenName = ResourceManagerUtils.getValueFromIdByName(id, "tokens"); - if (tokenName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tokens'.", id))); - } - this.delete(resourceGroupName, registryName, tokenName, context); - } - - private TokensClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public TokenImpl define(String name) { - return new TokenImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java deleted file mode 100644 index f6a350ae4a70..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; -import com.azure.resourcemanager.containerregistry.generated.models.Event; -import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class WebhookImpl implements Webhook, Webhook.Definition, Webhook.Update { - private WebhookInner innerObject; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager 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 WebhookProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public WebhookInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private String webhookName; - - private WebhookCreateParameters createWebhookCreateParameters; - - private WebhookUpdateParameters updateWebhookUpdateParameters; - - public WebhookImpl withExistingRegistry(String resourceGroupName, String registryName) { - this.resourceGroupName = resourceGroupName; - this.registryName = registryName; - return this; - } - - public Webhook create() { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .create(resourceGroupName, registryName, webhookName, createWebhookCreateParameters, Context.NONE); - return this; - } - - public Webhook create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .create(resourceGroupName, registryName, webhookName, createWebhookCreateParameters, context); - return this; - } - - WebhookImpl(String name, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.serviceManager = serviceManager; - this.webhookName = name; - this.createWebhookCreateParameters = new WebhookCreateParameters(); - } - - public WebhookImpl update() { - this.updateWebhookUpdateParameters = new WebhookUpdateParameters(); - return this; - } - - public Webhook apply() { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .update(resourceGroupName, registryName, webhookName, updateWebhookUpdateParameters, Context.NONE); - return this; - } - - public Webhook apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .update(resourceGroupName, registryName, webhookName, updateWebhookUpdateParameters, context); - return this; - } - - WebhookImpl(WebhookInner innerObject, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - this.webhookName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webhooks"); - } - - public Webhook refresh() { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE) - .getValue(); - return this; - } - - public Webhook refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWebhooks() - .getWithResponse(resourceGroupName, registryName, webhookName, context) - .getValue(); - return this; - } - - public Response pingWithResponse(Context context) { - return serviceManager.webhooks().pingWithResponse(resourceGroupName, registryName, webhookName, context); - } - - public EventInfo ping() { - return serviceManager.webhooks().ping(resourceGroupName, registryName, webhookName); - } - - public PagedIterable listEvents() { - return serviceManager.webhooks().listEvents(resourceGroupName, registryName, webhookName); - } - - public PagedIterable listEvents(Context context) { - return serviceManager.webhooks().listEvents(resourceGroupName, registryName, webhookName, context); - } - - public Response getCallbackConfigWithResponse(Context context) { - return serviceManager.webhooks() - .getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, context); - } - - public CallbackConfig getCallbackConfig() { - return serviceManager.webhooks().getCallbackConfig(resourceGroupName, registryName, webhookName); - } - - public WebhookImpl withRegion(Region location) { - this.createWebhookCreateParameters.withLocation(location.toString()); - return this; - } - - public WebhookImpl withRegion(String location) { - this.createWebhookCreateParameters.withLocation(location); - return this; - } - - public WebhookImpl withTags(Map tags) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withTags(tags); - return this; - } else { - this.updateWebhookUpdateParameters.withTags(tags); - return this; - } - } - - public WebhookImpl withServiceUri(String serviceUri) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withServiceUri(serviceUri); - return this; - } else { - this.updateWebhookUpdateParameters.withServiceUri(serviceUri); - return this; - } - } - - public WebhookImpl withCustomHeaders(Map customHeaders) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withCustomHeaders(customHeaders); - return this; - } else { - this.updateWebhookUpdateParameters.withCustomHeaders(customHeaders); - return this; - } - } - - public WebhookImpl withStatus(WebhookStatus status) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withStatus(status); - return this; - } else { - this.updateWebhookUpdateParameters.withStatus(status); - return this; - } - } - - public WebhookImpl withScope(String scope) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withScope(scope); - return this; - } else { - this.updateWebhookUpdateParameters.withScope(scope); - return this; - } - } - - public WebhookImpl withActions(List actions) { - if (isInCreateMode()) { - this.createWebhookCreateParameters.withActions(actions); - return this; - } else { - this.updateWebhookUpdateParameters.withActions(actions); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java deleted file mode 100644 index 18f15c1e4032..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java +++ /dev/null @@ -1,1363 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.WebhooksClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; -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 WebhooksClient. - */ -public final class WebhooksClientImpl implements WebhooksClient { - /** - * The proxy service used to perform REST calls. - */ - private final WebhooksService service; - - /** - * The service client containing this operation class. - */ - private final ContainerRegistryManagementClientImpl client; - - /** - * Initializes an instance of WebhooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WebhooksClientImpl(ContainerRegistryManagementClientImpl client) { - this.service = RestProxy.create(WebhooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerRegistryManagementClientWebhooks to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerRegistryManagementClientWebhooks") - public interface WebhooksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") WebhookCreateParameters webhookCreateParameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") WebhookUpdateParameters webhookUpdateParameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> ping(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEvents(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getCallbackConfig(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEventsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified webhook along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String webhookName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context); - } - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified webhook on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String webhookName) { - return getWithResponseAsync(resourceGroupName, registryName, webhookName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); - } - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified webhook. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebhookInner get(String resourceGroupName, String registryName, String webhookName) { - return getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, - webhookCreateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, contentType, accept, webhookCreateParameters, context); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebhookInner> beginCreateAsync(String resourceGroupName, - String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WebhookInner.class, WebhookInner.class, this.client.getContext()); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebhookInner> beginCreateAsync(String resourceGroupName, - String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WebhookInner.class, WebhookInner.class, context); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters) { - return this.beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters) - .getSyncPoller(); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebhookInner> beginCreate(String resourceGroupName, String registryName, - String webhookName, WebhookCreateParameters webhookCreateParameters, Context context) { - return this.beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context) - .getSyncPoller(); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters) { - return beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters, Context context) { - return beginCreateAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebhookInner create(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters) { - return createAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).block(); - } - - /** - * Creates a webhook for a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookCreateParameters The parameters for creating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebhookInner create(String resourceGroupName, String registryName, String webhookName, - WebhookCreateParameters webhookCreateParameters, Context context) { - return createAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters, context).block(); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, - webhookUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, contentType, accept, webhookUpdateParameters, context); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebhookInner> beginUpdateAsync(String resourceGroupName, - String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WebhookInner.class, WebhookInner.class, this.client.getContext()); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebhookInner> beginUpdateAsync(String resourceGroupName, - String registryName, String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WebhookInner.class, WebhookInner.class, context); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters) - .getSyncPoller(); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebhookInner> beginUpdate(String resourceGroupName, String registryName, - String webhookName, WebhookUpdateParameters webhookUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context) - .getSyncPoller(); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters) { - return beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebhookInner update(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters) { - return updateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters).block(); - } - - /** - * Updates a webhook with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @param webhookUpdateParameters The parameters for updating a webhook. - * @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 an object that represents a webhook for a container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebhookInner update(String resourceGroupName, String registryName, String webhookName, - WebhookUpdateParameters webhookUpdateParameters, Context context) { - return updateAsync(resourceGroupName, registryName, webhookName, webhookUpdateParameters, context).block(); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, - String webhookName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 registryName, - String webhookName, Context context) { - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, context); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDeleteAsync(String resourceGroupName, String registryName, - String webhookName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, webhookName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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> beginDeleteAsync(String resourceGroupName, String registryName, - String webhookName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, webhookName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginDelete(String resourceGroupName, String registryName, - String webhookName) { - return this.beginDeleteAsync(resourceGroupName, registryName, webhookName).getSyncPoller(); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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> beginDelete(String resourceGroupName, String registryName, - String webhookName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, webhookName, context).getSyncPoller(); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String webhookName) { - return beginDeleteAsync(resourceGroupName, registryName, webhookName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 deleteAsync(String resourceGroupName, String registryName, String webhookName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, webhookName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 registryName, String webhookName) { - deleteAsync(resourceGroupName, registryName, webhookName).block(); - } - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context) { - deleteAsync(resourceGroupName, registryName, webhookName, context).block(); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, - String webhookName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.ping(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context); - } - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 basic information of an event on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono pingAsync(String resourceGroupName, String registryName, String webhookName) { - return pingWithResponseAsync(resourceGroupName, registryName, webhookName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context) { - return pingWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); - } - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 basic information of an event. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventInfoInner ping(String resourceGroupName, String registryName, String webhookName) { - return pingWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list events for a webhook along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEventsSinglePageAsync(String resourceGroupName, String registryName, - String webhookName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listEvents(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, 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())); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEventsSinglePageAsync(String resourceGroupName, String registryName, - String webhookName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listEvents(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list events for a webhook as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listEventsAsync(String resourceGroupName, String registryName, String webhookName) { - return new PagedFlux<>(() -> listEventsSinglePageAsync(resourceGroupName, registryName, webhookName), - nextLink -> listEventsNextSinglePageAsync(nextLink)); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listEventsAsync(String resourceGroupName, String registryName, String webhookName, - Context context) { - return new PagedFlux<>(() -> listEventsSinglePageAsync(resourceGroupName, registryName, webhookName, context), - nextLink -> listEventsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName) { - return new PagedIterable<>(listEventsAsync(resourceGroupName, registryName, webhookName)); - } - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, - Context context) { - return new PagedIterable<>(listEventsAsync(resourceGroupName, registryName, webhookName, context)); - } - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 configuration of service URI and custom headers for the webhook along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, - String registryName, String webhookName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, - String registryName, String webhookName, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context); - } - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 configuration of service URI and custom headers for the webhook on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getCallbackConfigAsync(String resourceGroupName, String registryName, - String webhookName) { - return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context) { - return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); - } - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 configuration of service URI and custom headers for the webhook. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { - return getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - 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. - * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list events for a webhook along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEventsNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listEventsNext(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. - * @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 result of a request to list events for a webhook along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEventsNextSinglePageAsync(String nextLink, Context context) { - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listEventsNext(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/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java deleted file mode 100644 index 1e1f9f70c9b1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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.containerregistry.generated.fluent.WebhooksClient; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; -import com.azure.resourcemanager.containerregistry.generated.models.Event; -import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.Webhooks; - -public final class WebhooksImpl implements Webhooks { - private static final ClientLogger LOGGER = new ClientLogger(WebhooksImpl.class); - - private final WebhooksClient innerClient; - - private final com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager; - - public WebhooksImpl(WebhooksClient innerClient, - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, webhookName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WebhookImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Webhook get(String resourceGroupName, String registryName, String webhookName) { - WebhookInner inner = this.serviceClient().get(resourceGroupName, registryName, webhookName); - if (inner != null) { - return new WebhookImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String registryName, String webhookName) { - this.serviceClient().delete(resourceGroupName, registryName, webhookName); - } - - public void delete(String resourceGroupName, String registryName, String webhookName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, webhookName, context); - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookImpl(inner1, this.manager())); - } - - public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context) { - Response inner - = this.serviceClient().pingWithResponse(resourceGroupName, registryName, webhookName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventInfoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EventInfo ping(String resourceGroupName, String registryName, String webhookName) { - EventInfoInner inner = this.serviceClient().ping(resourceGroupName, registryName, webhookName); - if (inner != null) { - return new EventInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName) { - PagedIterable inner = this.serviceClient().listEvents(resourceGroupName, registryName, webhookName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, - Context context) { - PagedIterable inner - = this.serviceClient().listEvents(resourceGroupName, registryName, webhookName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context) { - Response inner - = this.serviceClient().getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CallbackConfigImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CallbackConfig getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { - CallbackConfigInner inner - = this.serviceClient().getCallbackConfig(resourceGroupName, registryName, webhookName); - if (inner != null) { - return new CallbackConfigImpl(inner, this.manager()); - } else { - return null; - } - } - - public Webhook getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); - if (webhookName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); - if (webhookName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); - } - return this.getWithResponse(resourceGroupName, registryName, webhookName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); - if (webhookName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); - } - this.delete(resourceGroupName, registryName, webhookName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - String webhookName = ResourceManagerUtils.getValueFromIdByName(id, "webhooks"); - if (webhookName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webhooks'.", id))); - } - this.delete(resourceGroupName, registryName, webhookName, context); - } - - private WebhooksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager() { - return this.serviceManager; - } - - public WebhookImpl define(String name) { - return new WebhookImpl(name, this.manager()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java deleted file mode 100644 index ac5e83394365..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list cache rules for a container registry. - */ -@Immutable -public final class CacheRulesListResult implements JsonSerializable { - /* - * The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next - * list of cache rules. - */ - private List value; - - /* - * The URI that can be used to request the next list of cache rules. - */ - private String nextLink; - - /** - * Creates an instance of CacheRulesListResult class. - */ - private CacheRulesListResult() { - } - - /** - * Get the value property: The list of cache rules. Since this list may be incomplete, the nextLink field should be - * used to request the next list of cache rules. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of cache rules. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CacheRulesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CacheRulesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CacheRulesListResult. - */ - public static CacheRulesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CacheRulesListResult deserializedCacheRulesListResult = new CacheRulesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CacheRuleInner.fromJson(reader1)); - deserializedCacheRulesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCacheRulesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCacheRulesListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java deleted file mode 100644 index ac4a2eacf858..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list connected registries for a container registry. - */ -@Immutable -public final class ConnectedRegistryListResult implements JsonSerializable { - /* - * The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request - * the next list of connected registries. - */ - private List value; - - /* - * The URI that can be used to request the next list of connected registries. - */ - private String nextLink; - - /** - * Creates an instance of ConnectedRegistryListResult class. - */ - private ConnectedRegistryListResult() { - } - - /** - * Get the value property: The list of connected registries. Since this list may be incomplete, the nextLink field - * should be used to request the next list of connected registries. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of connected registries. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedRegistryListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedRegistryListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedRegistryListResult. - */ - public static ConnectedRegistryListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedRegistryListResult deserializedConnectedRegistryListResult = new ConnectedRegistryListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ConnectedRegistryInner.fromJson(reader1)); - deserializedConnectedRegistryListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedConnectedRegistryListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedRegistryListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java deleted file mode 100644 index 33effd2eb4e2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list credential sets for a container registry. - */ -@Immutable -public final class CredentialSetListResult implements JsonSerializable { - /* - * The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the - * next list of credential sets. - */ - private List value; - - /* - * The URI that can be used to request the next list of credential sets. - */ - private String nextLink; - - /** - * Creates an instance of CredentialSetListResult class. - */ - private CredentialSetListResult() { - } - - /** - * Get the value property: The list of credential sets. Since this list may be incomplete, the nextLink field should - * be used to request the next list of credential sets. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of credential sets. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialSetListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialSetListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialSetListResult. - */ - public static CredentialSetListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialSetListResult deserializedCredentialSetListResult = new CredentialSetListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CredentialSetInner.fromJson(reader1)); - deserializedCredentialSetListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCredentialSetListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialSetListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java deleted file mode 100644 index a68782da1937..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list events for a webhook. - */ -@Immutable -public final class EventListResult implements JsonSerializable { - /* - * The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list - * of events. - */ - private List value; - - /* - * The URI that can be used to request the next list of events. - */ - private String nextLink; - - /** - * Creates an instance of EventListResult class. - */ - private EventListResult() { - } - - /** - * Get the value property: The list of events. Since this list may be incomplete, the nextLink field should be used - * to request the next list of events. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of events. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventListResult. - */ - public static EventListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventListResult deserializedEventListResult = new EventListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> EventInner.fromJson(reader1)); - deserializedEventListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEventListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java deleted file mode 100644 index 5fb42cde45a8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list container registry operations. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The list of container registry operations. Since this list may be incomplete, the nextLink field should be used - * to request the next list of operations. - */ - private List value; - - /* - * The URI that can be used to request the next list of container registry operations. - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The list of container registry operations. Since this list may be incomplete, the - * nextLink field should be used to request the next list of operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of container registry operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OperationDefinitionInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java deleted file mode 100644 index dcfda77abc57..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list private endpoint connections for a container registry. - */ -@Immutable -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { - /* - * The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to - * request the next list of private endpoint connections. - */ - private List value; - - /* - * The URI that can be used to request the next list of private endpoint connections. - */ - private String nextLink; - - /** - * Creates an instance of PrivateEndpointConnectionListResult class. - */ - private PrivateEndpointConnectionListResult() { - } - - /** - * Get the value property: The list of private endpoint connections. Since this list may be incomplete, the nextLink - * field should be used to request the next list of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of private endpoint connections. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. - */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java deleted file mode 100644 index c3c89bb86d89..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list private link resources for a container registry. - */ -@Immutable -public final class PrivateLinkResourceListResult implements JsonSerializable { - /* - * The list of private link resources. Since this list may be incomplete, the nextLink field should be used to - * request the next list of private link resources. - */ - private List value; - - /* - * The URI that can be used to request the next list of private link resources. - */ - private String nextLink; - - /** - * Creates an instance of PrivateLinkResourceListResult class. - */ - private PrivateLinkResourceListResult() { - } - - /** - * Get the value property: The list of private link resources. Since this list may be incomplete, the nextLink field - * should be used to request the next list of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of private link resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult. - */ - public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult - = new PrivateLinkResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java deleted file mode 100644 index 7fc9f7266b32..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list container registries. - */ -@Immutable -public final class RegistryListResult implements JsonSerializable { - /* - * The list of container registries. Since this list may be incomplete, the nextLink field should be used to request - * the next list of container registries. - */ - private List value; - - /* - * The URI that can be used to request the next list of container registries. - */ - private String nextLink; - - /** - * Creates an instance of RegistryListResult class. - */ - private RegistryListResult() { - } - - /** - * Get the value property: The list of container registries. Since this list may be incomplete, the nextLink field - * should be used to request the next list of container registries. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of container registries. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryListResult. - */ - public static RegistryListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryListResult deserializedRegistryListResult = new RegistryListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RegistryInner.fromJson(reader1)); - deserializedRegistryListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRegistryListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java deleted file mode 100644 index 7088bbcc45d8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list replications for a container registry. - */ -@Immutable -public final class ReplicationListResult implements JsonSerializable { - /* - * The list of replications. Since this list may be incomplete, the nextLink field should be used to request the - * next list of replications. - */ - private List value; - - /* - * The URI that can be used to request the next list of replications. - */ - private String nextLink; - - /** - * Creates an instance of ReplicationListResult class. - */ - private ReplicationListResult() { - } - - /** - * Get the value property: The list of replications. Since this list may be incomplete, the nextLink field should be - * used to request the next list of replications. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of replications. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationListResult. - */ - public static ReplicationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationListResult deserializedReplicationListResult = new ReplicationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ReplicationInner.fromJson(reader1)); - deserializedReplicationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedReplicationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java deleted file mode 100644 index 319e16193414..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list scope maps for a container registry. - */ -@Immutable -public final class ScopeMapListResult implements JsonSerializable { - /* - * The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next - * list of scope maps. - */ - private List value; - - /* - * The URI that can be used to request the next list of scope maps. - */ - private String nextLink; - - /** - * Creates an instance of ScopeMapListResult class. - */ - private ScopeMapListResult() { - } - - /** - * Get the value property: The list of scope maps. Since this list may be incomplete, the nextLink field should be - * used to request the next list of scope maps. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of scope maps. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScopeMapListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScopeMapListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScopeMapListResult. - */ - public static ScopeMapListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScopeMapListResult deserializedScopeMapListResult = new ScopeMapListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ScopeMapInner.fromJson(reader1)); - deserializedScopeMapListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScopeMapListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScopeMapListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java deleted file mode 100644 index 7a83d4eb70f3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list tokens for a container registry. - */ -@Immutable -public final class TokenListResult implements JsonSerializable { - /* - * The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list - * of tokens. - */ - private List value; - - /* - * The URI that can be used to request the next list of tokens. - */ - private String nextLink; - - /** - * Creates an instance of TokenListResult class. - */ - private TokenListResult() { - } - - /** - * Get the value property: The list of tokens. Since this list may be incomplete, the nextLink field should be used - * to request the next list of tokens. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of tokens. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenListResult. - */ - public static TokenListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenListResult deserializedTokenListResult = new TokenListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> TokenInner.fromJson(reader1)); - deserializedTokenListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTokenListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java deleted file mode 100644 index 96f9f59ec06a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list webhooks for a container registry. - */ -@Immutable -public final class WebhookListResult implements JsonSerializable { - /* - * The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next - * list of webhooks. - */ - private List value; - - /* - * The URI that can be used to request the next list of webhooks. - */ - private String nextLink; - - /** - * Creates an instance of WebhookListResult class. - */ - private WebhookListResult() { - } - - /** - * Get the value property: The list of webhooks. Since this list may be incomplete, the nextLink field should be - * used to request the next list of webhooks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of webhooks. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookListResult. - */ - public static WebhookListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookListResult deserializedWebhookListResult = new WebhookListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> WebhookInner.fromJson(reader1)); - deserializedWebhookListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWebhookListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookListResult; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java deleted file mode 100644 index 3be628c175ab..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the implementations for ContainerRegistry. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -package com.azure.resourcemanager.containerregistry.generated.implementation; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java deleted file mode 100644 index 942f2a7b92a8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The action of IP ACL rule. - */ -public final class Action extends ExpandableStringEnum { - /** - * Static value Allow for Action. - */ - public static final Action ALLOW = fromString("Allow"); - - /** - * Creates a new instance of Action value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Action() { - } - - /** - * Creates or finds a Action from its string representation. - * - * @param name a name to look for. - * @return the corresponding Action. - */ - public static Action fromString(String name) { - return fromString(name, Action.class); - } - - /** - * Gets known Action values. - * - * @return known Action values. - */ - public static Collection values() { - return values(Action.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java deleted file mode 100644 index 762b69700ae6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A message indicating if changes on the service provider require any updates on the consumer. - */ -public final class ActionsRequired extends ExpandableStringEnum { - /** - * Static value None for ActionsRequired. - */ - public static final ActionsRequired NONE = fromString("None"); - - /** - * Static value Recreate for ActionsRequired. - */ - public static final ActionsRequired RECREATE = fromString("Recreate"); - - /** - * Creates a new instance of ActionsRequired value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionsRequired() { - } - - /** - * Creates or finds a ActionsRequired from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionsRequired. - */ - public static ActionsRequired fromString(String name) { - return fromString(name, ActionsRequired.class); - } - - /** - * Gets known ActionsRequired values. - * - * @return known ActionsRequired values. - */ - public static Collection values() { - return values(ActionsRequired.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java deleted file mode 100644 index a30be97c5946..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The activation properties of the connected registry. - */ -@Immutable -public final class ActivationProperties implements JsonSerializable { - /* - * The activation status of the connected registry. - */ - private ActivationStatus status; - - /** - * Creates an instance of ActivationProperties class. - */ - private ActivationProperties() { - } - - /** - * Get the status property: The activation status of the connected registry. - * - * @return the status value. - */ - public ActivationStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActivationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActivationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ActivationProperties. - */ - public static ActivationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActivationProperties deserializedActivationProperties = new ActivationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedActivationProperties.status = ActivationStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedActivationProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java deleted file mode 100644 index 6118f3dbb7aa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The activation status of the connected registry. - */ -public final class ActivationStatus extends ExpandableStringEnum { - /** - * Static value Active for ActivationStatus. - */ - public static final ActivationStatus ACTIVE = fromString("Active"); - - /** - * Static value Inactive for ActivationStatus. - */ - public static final ActivationStatus INACTIVE = fromString("Inactive"); - - /** - * Creates a new instance of ActivationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActivationStatus() { - } - - /** - * Creates or finds a ActivationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActivationStatus. - */ - public static ActivationStatus fromString(String name) { - return fromString(name, ActivationStatus.class); - } - - /** - * Gets known ActivationStatus values. - * - * @return known ActivationStatus values. - */ - public static Collection values() { - return values(ActivationStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java deleted file mode 100644 index b6d35021e08e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The agent that initiated the event. For most situations, this could be from the authorization context of the request. - */ -@Immutable -public final class Actor implements JsonSerializable { - /* - * The subject or username associated with the request context that generated the event. - */ - private String name; - - /** - * Creates an instance of Actor class. - */ - private Actor() { - } - - /** - * Get the name property: The subject or username associated with the request context that generated the event. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Actor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Actor if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Actor. - */ - public static Actor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Actor deserializedActor = new Actor(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedActor.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedActor; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java deleted file mode 100644 index 43b4ee7ba8f9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether audit logs are enabled on the connected registry. - */ -public final class AuditLogStatus extends ExpandableStringEnum { - /** - * Static value Enabled for AuditLogStatus. - */ - public static final AuditLogStatus ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for AuditLogStatus. - */ - public static final AuditLogStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of AuditLogStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AuditLogStatus() { - } - - /** - * Creates or finds a AuditLogStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AuditLogStatus. - */ - public static AuditLogStatus fromString(String name) { - return fromString(name, AuditLogStatus.class); - } - - /** - * Gets known AuditLogStatus values. - * - * @return known AuditLogStatus values. - */ - public static Collection values() { - return values(AuditLogStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java deleted file mode 100644 index 3721d80629dc..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Authentication credential stored for an upstream. - */ -@Fluent -public final class AuthCredential implements JsonSerializable { - /* - * The name of the credential. - */ - private CredentialName name; - - /* - * KeyVault Secret URI for accessing the username. - */ - private String usernameSecretIdentifier; - - /* - * KeyVault Secret URI for accessing the password. - */ - private String passwordSecretIdentifier; - - /* - * This provides data pertaining to the health of the auth credential. - */ - private CredentialHealth credentialHealth; - - /** - * Creates an instance of AuthCredential class. - */ - public AuthCredential() { - } - - /** - * Get the name property: The name of the credential. - * - * @return the name value. - */ - public CredentialName name() { - return this.name; - } - - /** - * Set the name property: The name of the credential. - * - * @param name the name value to set. - * @return the AuthCredential object itself. - */ - public AuthCredential withName(CredentialName name) { - this.name = name; - return this; - } - - /** - * Get the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. - * - * @return the usernameSecretIdentifier value. - */ - public String usernameSecretIdentifier() { - return this.usernameSecretIdentifier; - } - - /** - * Set the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. - * - * @param usernameSecretIdentifier the usernameSecretIdentifier value to set. - * @return the AuthCredential object itself. - */ - public AuthCredential withUsernameSecretIdentifier(String usernameSecretIdentifier) { - this.usernameSecretIdentifier = usernameSecretIdentifier; - return this; - } - - /** - * Get the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. - * - * @return the passwordSecretIdentifier value. - */ - public String passwordSecretIdentifier() { - return this.passwordSecretIdentifier; - } - - /** - * Set the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. - * - * @param passwordSecretIdentifier the passwordSecretIdentifier value to set. - * @return the AuthCredential object itself. - */ - public AuthCredential withPasswordSecretIdentifier(String passwordSecretIdentifier) { - this.passwordSecretIdentifier = passwordSecretIdentifier; - return this; - } - - /** - * Get the credentialHealth property: This provides data pertaining to the health of the auth credential. - * - * @return the credentialHealth value. - */ - public CredentialHealth credentialHealth() { - return this.credentialHealth; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - jsonWriter.writeStringField("usernameSecretIdentifier", this.usernameSecretIdentifier); - jsonWriter.writeStringField("passwordSecretIdentifier", this.passwordSecretIdentifier); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthCredential if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AuthCredential. - */ - public static AuthCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthCredential deserializedAuthCredential = new AuthCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedAuthCredential.name = CredentialName.fromString(reader.getString()); - } else if ("usernameSecretIdentifier".equals(fieldName)) { - deserializedAuthCredential.usernameSecretIdentifier = reader.getString(); - } else if ("passwordSecretIdentifier".equals(fieldName)) { - deserializedAuthCredential.passwordSecretIdentifier = reader.getString(); - } else if ("credentialHealth".equals(fieldName)) { - deserializedAuthCredential.credentialHealth = CredentialHealth.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthCredential; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java deleted file mode 100644 index 6b0b602ffa78..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The policy for using Azure Resource Manager audience token for a container registry. - */ -@Fluent -public final class AzureADAuthenticationAsArmPolicy implements JsonSerializable { - /* - * The value that indicates whether the policy is enabled or not. - */ - private AzureADAuthenticationAsArmPolicyStatus status; - - /** - * Creates an instance of AzureADAuthenticationAsArmPolicy class. - */ - public AzureADAuthenticationAsArmPolicy() { - } - - /** - * Get the status property: The value that indicates whether the policy is enabled or not. - * - * @return the status value. - */ - public AzureADAuthenticationAsArmPolicyStatus status() { - return this.status; - } - - /** - * Set the status property: The value that indicates whether the policy is enabled or not. - * - * @param status the status value to set. - * @return the AzureADAuthenticationAsArmPolicy object itself. - */ - public AzureADAuthenticationAsArmPolicy withStatus(AzureADAuthenticationAsArmPolicyStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureADAuthenticationAsArmPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureADAuthenticationAsArmPolicy if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureADAuthenticationAsArmPolicy. - */ - public static AzureADAuthenticationAsArmPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureADAuthenticationAsArmPolicy deserializedAzureADAuthenticationAsArmPolicy - = new AzureADAuthenticationAsArmPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedAzureADAuthenticationAsArmPolicy.status - = AzureADAuthenticationAsArmPolicyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureADAuthenticationAsArmPolicy; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java deleted file mode 100644 index cf8af7e4ed3a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The value that indicates whether the policy is enabled or not. - */ -public final class AzureADAuthenticationAsArmPolicyStatus - extends ExpandableStringEnum { - /** - * Static value enabled for AzureADAuthenticationAsArmPolicyStatus. - */ - public static final AzureADAuthenticationAsArmPolicyStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for AzureADAuthenticationAsArmPolicyStatus. - */ - public static final AzureADAuthenticationAsArmPolicyStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of AzureADAuthenticationAsArmPolicyStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AzureADAuthenticationAsArmPolicyStatus() { - } - - /** - * Creates or finds a AzureADAuthenticationAsArmPolicyStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AzureADAuthenticationAsArmPolicyStatus. - */ - public static AzureADAuthenticationAsArmPolicyStatus fromString(String name) { - return fromString(name, AzureADAuthenticationAsArmPolicyStatus.class); - } - - /** - * Gets known AzureADAuthenticationAsArmPolicyStatus values. - * - * @return known AzureADAuthenticationAsArmPolicyStatus values. - */ - public static Collection values() { - return values(AzureADAuthenticationAsArmPolicyStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java deleted file mode 100644 index 61bea410bbe4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner; - -/** - * An immutable client-side representation of CacheRule. - */ -public interface CacheRule { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of the cache rule. - * - * @return the properties value. - */ - CacheRuleProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner object. - * - * @return the inner object. - */ - CacheRuleInner innerModel(); - - /** - * The entirety of the CacheRule definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The CacheRule definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the CacheRule definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the CacheRule definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the CacheRule 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - CacheRule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CacheRule create(Context context); - } - - /** - * The stage of the CacheRule definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the cache rule.. - * - * @param properties The properties of the cache rule. - * @return the next definition stage. - */ - WithCreate withProperties(CacheRuleProperties properties); - } - } - - /** - * Begins update for the CacheRule resource. - * - * @return the stage of resource update. - */ - CacheRule.Update update(); - - /** - * The template for CacheRule update. - */ - interface Update extends UpdateStages.WithCredentialSetResourceId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CacheRule apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CacheRule apply(Context context); - } - - /** - * The CacheRule update stages. - */ - interface UpdateStages { - /** - * The stage of the CacheRule update allowing to specify credentialSetResourceId. - */ - interface WithCredentialSetResourceId { - /** - * Specifies the credentialSetResourceId property: The ARM resource ID of the credential store which is - * associated with the Cache rule.. - * - * @param credentialSetResourceId The ARM resource ID of the credential store which is associated with the - * Cache rule. - * @return the next definition stage. - */ - Update withCredentialSetResourceId(String credentialSetResourceId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CacheRule refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CacheRule refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java deleted file mode 100644 index 63fed19c7159..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The properties of a cache rule. - */ -@Fluent -public final class CacheRuleProperties implements JsonSerializable { - /* - * The ARM resource ID of the credential store which is associated with the cache rule. - */ - private String credentialSetResourceId; - - /* - * Source repository pulled from upstream. - */ - private String sourceRepository; - - /* - * Target repository specified in docker pull command. - * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag} - */ - private String targetRepository; - - /* - * The creation date of the cache rule. - */ - private OffsetDateTime creationDate; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of CacheRuleProperties class. - */ - public CacheRuleProperties() { - } - - /** - * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the cache rule. - * - * @return the credentialSetResourceId value. - */ - public String credentialSetResourceId() { - return this.credentialSetResourceId; - } - - /** - * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the cache rule. - * - * @param credentialSetResourceId the credentialSetResourceId value to set. - * @return the CacheRuleProperties object itself. - */ - public CacheRuleProperties withCredentialSetResourceId(String credentialSetResourceId) { - this.credentialSetResourceId = credentialSetResourceId; - return this; - } - - /** - * Get the sourceRepository property: Source repository pulled from upstream. - * - * @return the sourceRepository value. - */ - public String sourceRepository() { - return this.sourceRepository; - } - - /** - * Set the sourceRepository property: Source repository pulled from upstream. - * - * @param sourceRepository the sourceRepository value to set. - * @return the CacheRuleProperties object itself. - */ - public CacheRuleProperties withSourceRepository(String sourceRepository) { - this.sourceRepository = sourceRepository; - return this; - } - - /** - * Get the targetRepository property: Target repository specified in docker pull command. - * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}. - * - * @return the targetRepository value. - */ - public String targetRepository() { - return this.targetRepository; - } - - /** - * Set the targetRepository property: Target repository specified in docker pull command. - * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}. - * - * @param targetRepository the targetRepository value to set. - * @return the CacheRuleProperties object itself. - */ - public CacheRuleProperties withTargetRepository(String targetRepository) { - this.targetRepository = targetRepository; - return this; - } - - /** - * Get the creationDate property: The creation date of the cache rule. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialSetResourceId", this.credentialSetResourceId); - jsonWriter.writeStringField("sourceRepository", this.sourceRepository); - jsonWriter.writeStringField("targetRepository", this.targetRepository); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CacheRuleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CacheRuleProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CacheRuleProperties. - */ - public static CacheRuleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CacheRuleProperties deserializedCacheRuleProperties = new CacheRuleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialSetResourceId".equals(fieldName)) { - deserializedCacheRuleProperties.credentialSetResourceId = reader.getString(); - } else if ("sourceRepository".equals(fieldName)) { - deserializedCacheRuleProperties.sourceRepository = reader.getString(); - } else if ("targetRepository".equals(fieldName)) { - deserializedCacheRuleProperties.targetRepository = reader.getString(); - } else if ("creationDate".equals(fieldName)) { - deserializedCacheRuleProperties.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedCacheRuleProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCacheRuleProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java deleted file mode 100644 index ff8dfbddff79..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties; -import java.io.IOException; - -/** - * The parameters for updating a cache rule. - */ -@Fluent -public final class CacheRuleUpdateParameters implements JsonSerializable { - /* - * The properties of the cache rule update parameters. - */ - private CacheRuleUpdateProperties innerProperties; - - /** - * Creates an instance of CacheRuleUpdateParameters class. - */ - public CacheRuleUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the cache rule update parameters. - * - * @return the innerProperties value. - */ - private CacheRuleUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the Cache rule. - * - * @return the credentialSetResourceId value. - */ - public String credentialSetResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().credentialSetResourceId(); - } - - /** - * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with - * the Cache rule. - * - * @param credentialSetResourceId the credentialSetResourceId value to set. - * @return the CacheRuleUpdateParameters object itself. - */ - public CacheRuleUpdateParameters withCredentialSetResourceId(String credentialSetResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new CacheRuleUpdateProperties(); - } - this.innerProperties().withCredentialSetResourceId(credentialSetResourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CacheRuleUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CacheRuleUpdateParameters if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CacheRuleUpdateParameters. - */ - public static CacheRuleUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CacheRuleUpdateParameters deserializedCacheRuleUpdateParameters = new CacheRuleUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCacheRuleUpdateParameters.innerProperties = CacheRuleUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCacheRuleUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java deleted file mode 100644 index 5747664b6003..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 CacheRules. - */ -public interface CacheRules { - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String cacheRuleName, - Context context); - - /** - * Gets the properties of the specified cache rule resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 properties of the specified cache rule resource. - */ - CacheRule get(String resourceGroupName, String registryName, String cacheRuleName); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 registryName, String cacheRuleName); - - /** - * Deletes a cache rule resource from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param cacheRuleName The name of the cache rule. - * @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 delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified cache rule resource. - * - * @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 properties of the specified cache rule resource along with {@link Response}. - */ - CacheRule getById(String id); - - /** - * Gets the properties of the specified cache rule resource. - * - * @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 properties of the specified cache rule resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a cache rule resource from a container registry. - * - * @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); - - /** - * Deletes a cache rule resource from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CacheRule resource. - * - * @param name resource name. - * @return the first stage of the new CacheRule definition. - */ - CacheRule.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java deleted file mode 100644 index 75f670218923..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; -import java.util.Map; - -/** - * An immutable client-side representation of CallbackConfig. - */ -public interface CallbackConfig { - /** - * Gets the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - String serviceUri(); - - /** - * Gets the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - Map customHeaders(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner object. - * - * @return the inner object. - */ - CallbackConfigInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java deleted file mode 100644 index f29e3c8de58b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of certificate location. - */ -public final class CertificateType extends ExpandableStringEnum { - /** - * Static value LocalDirectory for CertificateType. - */ - public static final CertificateType LOCAL_DIRECTORY = fromString("LocalDirectory"); - - /** - * Creates a new instance of CertificateType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CertificateType() { - } - - /** - * Creates or finds a CertificateType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CertificateType. - */ - public static CertificateType fromString(String name) { - return fromString(name, CertificateType.class); - } - - /** - * Gets known CertificateType values. - * - * @return known CertificateType values. - */ - public static Collection values() { - return values(CertificateType.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java deleted file mode 100644 index 130a1dddbd78..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 ConnectedRegistries. - */ -public interface ConnectedRegistries { - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, - String connectedRegistryName, Context context); - - /** - * Gets the properties of the connected registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 properties of the connected registry. - */ - ConnectedRegistry get(String resourceGroupName, String registryName, String connectedRegistryName); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 registryName, String connectedRegistryName); - - /** - * Deletes a connected registry from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName); - - /** - * Deactivates the connected registry instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param connectedRegistryName The name of the connected registry. - * @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 deactivate(String resourceGroupName, String registryName, String connectedRegistryName, Context context); - - /** - * Gets the properties of the connected registry. - * - * @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 properties of the connected registry along with {@link Response}. - */ - ConnectedRegistry getById(String id); - - /** - * Gets the properties of the connected registry. - * - * @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 properties of the connected registry along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a connected registry from a container registry. - * - * @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); - - /** - * Deletes a connected registry from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ConnectedRegistry resource. - * - * @param name resource name. - * @return the first stage of the new ConnectedRegistry definition. - */ - ConnectedRegistry.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java deleted file mode 100644 index 95e4fb97f005..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner; -import java.util.List; - -/** - * An immutable client-side representation of ConnectedRegistry. - */ -public interface ConnectedRegistry { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of the connected registry. - * - * @return the properties value. - */ - ConnectedRegistryProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner object. - * - * @return the inner object. - */ - ConnectedRegistryInner innerModel(); - - /** - * The entirety of the ConnectedRegistry definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ConnectedRegistry definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ConnectedRegistry definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ConnectedRegistry definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the ConnectedRegistry 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ConnectedRegistry create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ConnectedRegistry create(Context context); - } - - /** - * The stage of the ConnectedRegistry definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the connected registry.. - * - * @param properties The properties of the connected registry. - * @return the next definition stage. - */ - WithCreate withProperties(ConnectedRegistryProperties properties); - } - } - - /** - * Begins update for the ConnectedRegistry resource. - * - * @return the stage of resource update. - */ - ConnectedRegistry.Update update(); - - /** - * The template for ConnectedRegistry update. - */ - interface Update extends UpdateStages.WithSyncProperties, UpdateStages.WithLogging, UpdateStages.WithClientTokenIds, - UpdateStages.WithNotificationsList, UpdateStages.WithGarbageCollection { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ConnectedRegistry apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ConnectedRegistry apply(Context context); - } - - /** - * The ConnectedRegistry update stages. - */ - interface UpdateStages { - /** - * The stage of the ConnectedRegistry update allowing to specify syncProperties. - */ - interface WithSyncProperties { - /** - * Specifies the syncProperties property: The sync properties of the connected registry with its parent.. - * - * @param syncProperties The sync properties of the connected registry with its parent. - * @return the next definition stage. - */ - Update withSyncProperties(SyncUpdateProperties syncProperties); - } - - /** - * The stage of the ConnectedRegistry update allowing to specify logging. - */ - interface WithLogging { - /** - * Specifies the logging property: The logging properties of the connected registry.. - * - * @param logging The logging properties of the connected registry. - * @return the next definition stage. - */ - Update withLogging(LoggingProperties logging); - } - - /** - * The stage of the ConnectedRegistry update allowing to specify clientTokenIds. - */ - interface WithClientTokenIds { - /** - * Specifies the clientTokenIds property: The list of the ACR token resource IDs used to authenticate - * clients to the connected registry.. - * - * @param clientTokenIds The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * @return the next definition stage. - */ - Update withClientTokenIds(List clientTokenIds); - } - - /** - * The stage of the ConnectedRegistry update allowing to specify notificationsList. - */ - interface WithNotificationsList { - /** - * Specifies the notificationsList property: The list of notifications subscription information for the - * connected registry.. - * - * @param notificationsList The list of notifications subscription information for the connected registry. - * @return the next definition stage. - */ - Update withNotificationsList(List notificationsList); - } - - /** - * The stage of the ConnectedRegistry update allowing to specify garbageCollection. - */ - interface WithGarbageCollection { - /** - * Specifies the garbageCollection property: The garbage collection properties of the connected registry.. - * - * @param garbageCollection The garbage collection properties of the connected registry. - * @return the next definition stage. - */ - Update withGarbageCollection(GarbageCollectionProperties garbageCollection); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ConnectedRegistry refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ConnectedRegistry refresh(Context context); - - /** - * Deactivates the connected registry instance. - * - * @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 deactivate(); - - /** - * Deactivates the connected registry instance. - * - * @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 deactivate(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java deleted file mode 100644 index 02c86718d4a9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode of the connected registry resource that indicates the permissions of the registry. - */ -public final class ConnectedRegistryMode extends ExpandableStringEnum { - /** - * Static value ReadWrite for ConnectedRegistryMode. - */ - public static final ConnectedRegistryMode READ_WRITE = fromString("ReadWrite"); - - /** - * Static value ReadOnly for ConnectedRegistryMode. - */ - public static final ConnectedRegistryMode READ_ONLY = fromString("ReadOnly"); - - /** - * Static value Registry for ConnectedRegistryMode. - */ - public static final ConnectedRegistryMode REGISTRY = fromString("Registry"); - - /** - * Static value Mirror for ConnectedRegistryMode. - */ - public static final ConnectedRegistryMode MIRROR = fromString("Mirror"); - - /** - * Creates a new instance of ConnectedRegistryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectedRegistryMode() { - } - - /** - * Creates or finds a ConnectedRegistryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectedRegistryMode. - */ - public static ConnectedRegistryMode fromString(String name) { - return fromString(name, ConnectedRegistryMode.class); - } - - /** - * Gets known ConnectedRegistryMode values. - * - * @return known ConnectedRegistryMode values. - */ - public static Collection values() { - return values(ConnectedRegistryMode.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java deleted file mode 100644 index 449bef20cb72..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * The properties of a connected registry. - */ -@Fluent -public final class ConnectedRegistryProperties implements JsonSerializable { - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * The mode of the connected registry resource that indicates the permissions of the registry. - */ - private ConnectedRegistryMode mode; - - /* - * The current version of ACR runtime on the connected registry. - */ - private String version; - - /* - * The current connection state of the connected registry. - */ - private ConnectionState connectionState; - - /* - * The last activity time of the connected registry. - */ - private OffsetDateTime lastActivityTime; - - /* - * The activation properties of the connected registry. - */ - private ActivationProperties activation; - - /* - * The parent of the connected registry. - */ - private ParentProperties parent; - - /* - * The list of the ACR token resource IDs used to authenticate clients to the connected registry. - */ - private List clientTokenIds; - - /* - * The login server properties of the connected registry. - */ - private LoginServerProperties loginServer; - - /* - * The logging properties of the connected registry. - */ - private LoggingProperties logging; - - /* - * The list of current statuses of the connected registry. - */ - private List statusDetails; - - /* - * The list of notifications subscription information for the connected registry. - */ - private List notificationsList; - - /* - * The garbage collection properties of the connected registry. - */ - private GarbageCollectionProperties garbageCollection; - - /** - * Creates an instance of ConnectedRegistryProperties class. - */ - public ConnectedRegistryProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the mode property: The mode of the connected registry resource that indicates the permissions of the - * registry. - * - * @return the mode value. - */ - public ConnectedRegistryMode mode() { - return this.mode; - } - - /** - * Set the mode property: The mode of the connected registry resource that indicates the permissions of the - * registry. - * - * @param mode the mode value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withMode(ConnectedRegistryMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the version property: The current version of ACR runtime on the connected registry. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the connectionState property: The current connection state of the connected registry. - * - * @return the connectionState value. - */ - public ConnectionState connectionState() { - return this.connectionState; - } - - /** - * Get the lastActivityTime property: The last activity time of the connected registry. - * - * @return the lastActivityTime value. - */ - public OffsetDateTime lastActivityTime() { - return this.lastActivityTime; - } - - /** - * Get the activation property: The activation properties of the connected registry. - * - * @return the activation value. - */ - public ActivationProperties activation() { - return this.activation; - } - - /** - * Get the parent property: The parent of the connected registry. - * - * @return the parent value. - */ - public ParentProperties parent() { - return this.parent; - } - - /** - * Set the parent property: The parent of the connected registry. - * - * @param parent the parent value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withParent(ParentProperties parent) { - this.parent = parent; - return this; - } - - /** - * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @return the clientTokenIds value. - */ - public List clientTokenIds() { - return this.clientTokenIds; - } - - /** - * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @param clientTokenIds the clientTokenIds value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withClientTokenIds(List clientTokenIds) { - this.clientTokenIds = clientTokenIds; - return this; - } - - /** - * Get the loginServer property: The login server properties of the connected registry. - * - * @return the loginServer value. - */ - public LoginServerProperties loginServer() { - return this.loginServer; - } - - /** - * Set the loginServer property: The login server properties of the connected registry. - * - * @param loginServer the loginServer value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withLoginServer(LoginServerProperties loginServer) { - this.loginServer = loginServer; - return this; - } - - /** - * Get the logging property: The logging properties of the connected registry. - * - * @return the logging value. - */ - public LoggingProperties logging() { - return this.logging; - } - - /** - * Set the logging property: The logging properties of the connected registry. - * - * @param logging the logging value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withLogging(LoggingProperties logging) { - this.logging = logging; - return this; - } - - /** - * Get the statusDetails property: The list of current statuses of the connected registry. - * - * @return the statusDetails value. - */ - public List statusDetails() { - return this.statusDetails; - } - - /** - * Get the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @return the notificationsList value. - */ - public List notificationsList() { - return this.notificationsList; - } - - /** - * Set the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @param notificationsList the notificationsList value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withNotificationsList(List notificationsList) { - this.notificationsList = notificationsList; - return this; - } - - /** - * Get the garbageCollection property: The garbage collection properties of the connected registry. - * - * @return the garbageCollection value. - */ - public GarbageCollectionProperties garbageCollection() { - return this.garbageCollection; - } - - /** - * Set the garbageCollection property: The garbage collection properties of the connected registry. - * - * @param garbageCollection the garbageCollection value to set. - * @return the ConnectedRegistryProperties object itself. - */ - public ConnectedRegistryProperties withGarbageCollection(GarbageCollectionProperties garbageCollection) { - this.garbageCollection = garbageCollection; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeJsonField("parent", this.parent); - jsonWriter.writeArrayField("clientTokenIds", this.clientTokenIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("loginServer", this.loginServer); - jsonWriter.writeJsonField("logging", this.logging); - jsonWriter.writeArrayField("notificationsList", this.notificationsList, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("garbageCollection", this.garbageCollection); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedRegistryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedRegistryProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConnectedRegistryProperties. - */ - public static ConnectedRegistryProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedRegistryProperties deserializedConnectedRegistryProperties = new ConnectedRegistryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedConnectedRegistryProperties.mode = ConnectedRegistryMode.fromString(reader.getString()); - } else if ("parent".equals(fieldName)) { - deserializedConnectedRegistryProperties.parent = ParentProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedConnectedRegistryProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("version".equals(fieldName)) { - deserializedConnectedRegistryProperties.version = reader.getString(); - } else if ("connectionState".equals(fieldName)) { - deserializedConnectedRegistryProperties.connectionState - = ConnectionState.fromString(reader.getString()); - } else if ("lastActivityTime".equals(fieldName)) { - deserializedConnectedRegistryProperties.lastActivityTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("activation".equals(fieldName)) { - deserializedConnectedRegistryProperties.activation = ActivationProperties.fromJson(reader); - } else if ("clientTokenIds".equals(fieldName)) { - List clientTokenIds = reader.readArray(reader1 -> reader1.getString()); - deserializedConnectedRegistryProperties.clientTokenIds = clientTokenIds; - } else if ("loginServer".equals(fieldName)) { - deserializedConnectedRegistryProperties.loginServer = LoginServerProperties.fromJson(reader); - } else if ("logging".equals(fieldName)) { - deserializedConnectedRegistryProperties.logging = LoggingProperties.fromJson(reader); - } else if ("statusDetails".equals(fieldName)) { - List statusDetails - = reader.readArray(reader1 -> StatusDetailProperties.fromJson(reader1)); - deserializedConnectedRegistryProperties.statusDetails = statusDetails; - } else if ("notificationsList".equals(fieldName)) { - List notificationsList = reader.readArray(reader1 -> reader1.getString()); - deserializedConnectedRegistryProperties.notificationsList = notificationsList; - } else if ("garbageCollection".equals(fieldName)) { - deserializedConnectedRegistryProperties.garbageCollection - = GarbageCollectionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedRegistryProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java deleted file mode 100644 index c6a389728e8c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties; -import java.io.IOException; -import java.util.List; - -/** - * The parameters for updating a connected registry. - */ -@Fluent -public final class ConnectedRegistryUpdateParameters implements JsonSerializable { - /* - * The properties of the connected registry update parameters. - */ - private ConnectedRegistryUpdateProperties innerProperties; - - /** - * Creates an instance of ConnectedRegistryUpdateParameters class. - */ - public ConnectedRegistryUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the connected registry update parameters. - * - * @return the innerProperties value. - */ - private ConnectedRegistryUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the syncProperties property: The sync properties of the connected registry with its parent. - * - * @return the syncProperties value. - */ - public SyncUpdateProperties syncProperties() { - return this.innerProperties() == null ? null : this.innerProperties().syncProperties(); - } - - /** - * Set the syncProperties property: The sync properties of the connected registry with its parent. - * - * @param syncProperties the syncProperties value to set. - * @return the ConnectedRegistryUpdateParameters object itself. - */ - public ConnectedRegistryUpdateParameters withSyncProperties(SyncUpdateProperties syncProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedRegistryUpdateProperties(); - } - this.innerProperties().withSyncProperties(syncProperties); - return this; - } - - /** - * Get the logging property: The logging properties of the connected registry. - * - * @return the logging value. - */ - public LoggingProperties logging() { - return this.innerProperties() == null ? null : this.innerProperties().logging(); - } - - /** - * Set the logging property: The logging properties of the connected registry. - * - * @param logging the logging value to set. - * @return the ConnectedRegistryUpdateParameters object itself. - */ - public ConnectedRegistryUpdateParameters withLogging(LoggingProperties logging) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedRegistryUpdateProperties(); - } - this.innerProperties().withLogging(logging); - return this; - } - - /** - * Get the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @return the clientTokenIds value. - */ - public List clientTokenIds() { - return this.innerProperties() == null ? null : this.innerProperties().clientTokenIds(); - } - - /** - * Set the clientTokenIds property: The list of the ACR token resource IDs used to authenticate clients to the - * connected registry. - * - * @param clientTokenIds the clientTokenIds value to set. - * @return the ConnectedRegistryUpdateParameters object itself. - */ - public ConnectedRegistryUpdateParameters withClientTokenIds(List clientTokenIds) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedRegistryUpdateProperties(); - } - this.innerProperties().withClientTokenIds(clientTokenIds); - return this; - } - - /** - * Get the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @return the notificationsList value. - */ - public List notificationsList() { - return this.innerProperties() == null ? null : this.innerProperties().notificationsList(); - } - - /** - * Set the notificationsList property: The list of notifications subscription information for the connected - * registry. - * - * @param notificationsList the notificationsList value to set. - * @return the ConnectedRegistryUpdateParameters object itself. - */ - public ConnectedRegistryUpdateParameters withNotificationsList(List notificationsList) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedRegistryUpdateProperties(); - } - this.innerProperties().withNotificationsList(notificationsList); - return this; - } - - /** - * Get the garbageCollection property: The garbage collection properties of the connected registry. - * - * @return the garbageCollection value. - */ - public GarbageCollectionProperties garbageCollection() { - return this.innerProperties() == null ? null : this.innerProperties().garbageCollection(); - } - - /** - * Set the garbageCollection property: The garbage collection properties of the connected registry. - * - * @param garbageCollection the garbageCollection value to set. - * @return the ConnectedRegistryUpdateParameters object itself. - */ - public ConnectedRegistryUpdateParameters withGarbageCollection(GarbageCollectionProperties garbageCollection) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedRegistryUpdateProperties(); - } - this.innerProperties().withGarbageCollection(garbageCollection); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedRegistryUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedRegistryUpdateParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedRegistryUpdateParameters. - */ - public static ConnectedRegistryUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedRegistryUpdateParameters deserializedConnectedRegistryUpdateParameters - = new ConnectedRegistryUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedConnectedRegistryUpdateParameters.innerProperties - = ConnectedRegistryUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedRegistryUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java deleted file mode 100644 index 007645bd9f62..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current connection state of the connected registry. - */ -public final class ConnectionState extends ExpandableStringEnum { - /** - * Static value Online for ConnectionState. - */ - public static final ConnectionState ONLINE = fromString("Online"); - - /** - * Static value Offline for ConnectionState. - */ - public static final ConnectionState OFFLINE = fromString("Offline"); - - /** - * Static value Syncing for ConnectionState. - */ - public static final ConnectionState SYNCING = fromString("Syncing"); - - /** - * Static value Unhealthy for ConnectionState. - */ - public static final ConnectionState UNHEALTHY = fromString("Unhealthy"); - - /** - * Creates a new instance of ConnectionState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionState() { - } - - /** - * Creates or finds a ConnectionState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionState. - */ - public static ConnectionState fromString(String name) { - return fromString(name, ConnectionState.class); - } - - /** - * Gets known ConnectionState values. - * - * @return known ConnectionState values. - */ - public static Collection values() { - return values(ConnectionState.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java deleted file mode 100644 index 2319a504fc84..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The private link service connection status. - */ -public final class ConnectionStatus extends ExpandableStringEnum { - /** - * Static value Approved for ConnectionStatus. - */ - public static final ConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Pending for ConnectionStatus. - */ - public static final ConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Rejected for ConnectionStatus. - */ - public static final ConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for ConnectionStatus. - */ - public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates a new instance of ConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionStatus() { - } - - /** - * Creates or finds a ConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionStatus. - */ - public static ConnectionStatus fromString(String name) { - return fromString(name, ConnectionStatus.class); - } - - /** - * Gets known ConnectionStatus values. - * - * @return known ConnectionStatus values. - */ - public static Collection values() { - return values(ConnectionStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java deleted file mode 100644 index cba709b1d788..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -/** - * The resource type for Container Registry. - */ -public enum ContainerRegistryResourceType { - /** - * Enum value Microsoft.ContainerRegistry/registries. - */ - MICROSOFT_CONTAINER_REGISTRY_REGISTRIES("Microsoft.ContainerRegistry/registries"); - - /** - * The actual serialized value for a ContainerRegistryResourceType instance. - */ - private final String value; - - ContainerRegistryResourceType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ContainerRegistryResourceType instance. - * - * @param value the serialized value to parse. - * @return the parsed ContainerRegistryResourceType object, or null if unable to parse. - */ - public static ContainerRegistryResourceType fromString(String value) { - if (value == null) { - return null; - } - ContainerRegistryResourceType[] items = ContainerRegistryResourceType.values(); - for (ContainerRegistryResourceType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java deleted file mode 100644 index 3f624dd89638..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The health of the auth credential. - */ -@Immutable -public final class CredentialHealth implements JsonSerializable { - /* - * The health status of credential. - */ - private CredentialHealthStatus status; - - /* - * Error code representing the health check error. - */ - private String errorCode; - - /* - * Descriptive message representing the health check error. - */ - private String errorMessage; - - /** - * Creates an instance of CredentialHealth class. - */ - private CredentialHealth() { - } - - /** - * Get the status property: The health status of credential. - * - * @return the status value. - */ - public CredentialHealthStatus status() { - return this.status; - } - - /** - * Get the errorCode property: Error code representing the health check error. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: Descriptive message representing the health check error. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("errorCode", this.errorCode); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialHealth from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialHealth if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialHealth. - */ - public static CredentialHealth fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialHealth deserializedCredentialHealth = new CredentialHealth(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedCredentialHealth.status = CredentialHealthStatus.fromString(reader.getString()); - } else if ("errorCode".equals(fieldName)) { - deserializedCredentialHealth.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedCredentialHealth.errorMessage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialHealth; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java deleted file mode 100644 index fb2b925efc13..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The health status of credential. - */ -public final class CredentialHealthStatus extends ExpandableStringEnum { - /** - * Static value Healthy for CredentialHealthStatus. - */ - public static final CredentialHealthStatus HEALTHY = fromString("Healthy"); - - /** - * Static value Unhealthy for CredentialHealthStatus. - */ - public static final CredentialHealthStatus UNHEALTHY = fromString("Unhealthy"); - - /** - * Creates a new instance of CredentialHealthStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CredentialHealthStatus() { - } - - /** - * Creates or finds a CredentialHealthStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding CredentialHealthStatus. - */ - public static CredentialHealthStatus fromString(String name) { - return fromString(name, CredentialHealthStatus.class); - } - - /** - * Gets known CredentialHealthStatus values. - * - * @return known CredentialHealthStatus values. - */ - public static Collection values() { - return values(CredentialHealthStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java deleted file mode 100644 index 1c7d68abc335..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The name of the credential. - */ -public final class CredentialName extends ExpandableStringEnum { - /** - * Static value Credential1 for CredentialName. - */ - public static final CredentialName CREDENTIAL1 = fromString("Credential1"); - - /** - * Creates a new instance of CredentialName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CredentialName() { - } - - /** - * Creates or finds a CredentialName from its string representation. - * - * @param name a name to look for. - * @return the corresponding CredentialName. - */ - public static CredentialName fromString(String name) { - return fromString(name, CredentialName.class); - } - - /** - * Gets known CredentialName values. - * - * @return known CredentialName values. - */ - public static Collection values() { - return values(CredentialName.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java deleted file mode 100644 index 5ceaf092612d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner; -import java.util.List; - -/** - * An immutable client-side representation of CredentialSet. - */ -public interface CredentialSet { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of the credential set. - * - * @return the properties value. - */ - CredentialSetProperties properties(); - - /** - * Gets the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. - * - * @return the identity value. - */ - IdentityProperties identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner object. - * - * @return the inner object. - */ - CredentialSetInner innerModel(); - - /** - * The entirety of the CredentialSet definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The CredentialSet definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the CredentialSet definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the CredentialSet definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the CredentialSet 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.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - CredentialSet create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CredentialSet create(Context context); - } - - /** - * The stage of the CredentialSet definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the credential set.. - * - * @param properties The properties of the credential set. - * @return the next definition stage. - */ - WithCreate withProperties(CredentialSetProperties properties); - } - - /** - * The stage of the CredentialSet definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Identities associated with the resource. This is used to access the - * KeyVault secrets.. - * - * @param identity Identities associated with the resource. This is used to access the KeyVault secrets. - * @return the next definition stage. - */ - WithCreate withIdentity(IdentityProperties identity); - } - } - - /** - * Begins update for the CredentialSet resource. - * - * @return the stage of resource update. - */ - CredentialSet.Update update(); - - /** - * The template for CredentialSet update. - */ - interface Update extends UpdateStages.WithIdentity, UpdateStages.WithAuthCredentials { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CredentialSet apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CredentialSet apply(Context context); - } - - /** - * The CredentialSet update stages. - */ - interface UpdateStages { - /** - * The stage of the CredentialSet update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Identities associated with the resource. This is used to access the - * KeyVault secrets.. - * - * @param identity Identities associated with the resource. This is used to access the KeyVault secrets. - * @return the next definition stage. - */ - Update withIdentity(IdentityProperties identity); - } - - /** - * The stage of the CredentialSet update allowing to specify authCredentials. - */ - interface WithAuthCredentials { - /** - * Specifies the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential.. - * - * @param authCredentials List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * @return the next definition stage. - */ - Update withAuthCredentials(List authCredentials); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CredentialSet refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CredentialSet refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java deleted file mode 100644 index 14dc2d558a53..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * The properties of a credential set resource. - */ -@Fluent -public final class CredentialSetProperties implements JsonSerializable { - /* - * The credentials are stored for this upstream or login server. - */ - private String loginServer; - - /* - * List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - */ - private List authCredentials; - - /* - * The creation date of credential store resource. - */ - private OffsetDateTime creationDate; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of CredentialSetProperties class. - */ - public CredentialSetProperties() { - } - - /** - * Get the loginServer property: The credentials are stored for this upstream or login server. - * - * @return the loginServer value. - */ - public String loginServer() { - return this.loginServer; - } - - /** - * Set the loginServer property: The credentials are stored for this upstream or login server. - * - * @param loginServer the loginServer value to set. - * @return the CredentialSetProperties object itself. - */ - public CredentialSetProperties withLoginServer(String loginServer) { - this.loginServer = loginServer; - return this; - } - - /** - * Get the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @return the authCredentials value. - */ - public List authCredentials() { - return this.authCredentials; - } - - /** - * Set the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @param authCredentials the authCredentials value to set. - * @return the CredentialSetProperties object itself. - */ - public CredentialSetProperties withAuthCredentials(List authCredentials) { - this.authCredentials = authCredentials; - return this; - } - - /** - * Get the creationDate property: The creation date of credential store resource. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("loginServer", this.loginServer); - jsonWriter.writeArrayField("authCredentials", this.authCredentials, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialSetProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialSetProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialSetProperties. - */ - public static CredentialSetProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialSetProperties deserializedCredentialSetProperties = new CredentialSetProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loginServer".equals(fieldName)) { - deserializedCredentialSetProperties.loginServer = reader.getString(); - } else if ("authCredentials".equals(fieldName)) { - List authCredentials - = reader.readArray(reader1 -> AuthCredential.fromJson(reader1)); - deserializedCredentialSetProperties.authCredentials = authCredentials; - } else if ("creationDate".equals(fieldName)) { - deserializedCredentialSetProperties.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedCredentialSetProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialSetProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java deleted file mode 100644 index ab5bf2e66a38..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties; -import java.io.IOException; -import java.util.List; - -/** - * The parameters for updating a credential set. - */ -@Fluent -public final class CredentialSetUpdateParameters implements JsonSerializable { - /* - * The properties of the credential set update parameters - */ - private CredentialSetUpdateProperties innerProperties; - - /* - * Identities associated with the resource. This is used to access the KeyVault secrets. - */ - private IdentityProperties identity; - - /** - * Creates an instance of CredentialSetUpdateParameters class. - */ - public CredentialSetUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the credential set update parameters. - * - * @return the innerProperties value. - */ - private CredentialSetUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. - * - * @return the identity value. - */ - public IdentityProperties identity() { - return this.identity; - } - - /** - * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. - * - * @param identity the identity value to set. - * @return the CredentialSetUpdateParameters object itself. - */ - public CredentialSetUpdateParameters withIdentity(IdentityProperties identity) { - this.identity = identity; - return this; - } - - /** - * Get the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @return the authCredentials value. - */ - public List authCredentials() { - return this.innerProperties() == null ? null : this.innerProperties().authCredentials(); - } - - /** - * Set the authCredentials property: List of authentication credentials stored for an upstream. - * Usually consists of a primary and an optional secondary credential. - * - * @param authCredentials the authCredentials value to set. - * @return the CredentialSetUpdateParameters object itself. - */ - public CredentialSetUpdateParameters withAuthCredentials(List authCredentials) { - if (this.innerProperties() == null) { - this.innerProperties = new CredentialSetUpdateProperties(); - } - this.innerProperties().withAuthCredentials(authCredentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialSetUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialSetUpdateParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialSetUpdateParameters. - */ - public static CredentialSetUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialSetUpdateParameters deserializedCredentialSetUpdateParameters - = new CredentialSetUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCredentialSetUpdateParameters.innerProperties - = CredentialSetUpdateProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedCredentialSetUpdateParameters.identity = IdentityProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialSetUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java deleted file mode 100644 index c22101741e5b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 CredentialSets. - */ -public interface CredentialSets { - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String credentialSetName, - Context context); - - /** - * Gets the properties of the specified credential set resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 properties of the specified credential set resource. - */ - CredentialSet get(String resourceGroupName, String registryName, String credentialSetName); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 registryName, String credentialSetName); - - /** - * Deletes a credential set from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param credentialSetName The name of the credential set. - * @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 delete(String resourceGroupName, String registryName, String credentialSetName, Context context); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified credential set resource. - * - * @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 properties of the specified credential set resource along with {@link Response}. - */ - CredentialSet getById(String id); - - /** - * Gets the properties of the specified credential set resource. - * - * @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 properties of the specified credential set resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a credential set from a container registry. - * - * @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); - - /** - * Deletes a credential set from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CredentialSet resource. - * - * @param name resource name. - * @return the first stage of the new CredentialSet definition. - */ - CredentialSet.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java deleted file mode 100644 index 05f32ea9c287..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The default action of allow or deny when no other rules match. - */ -public final class DefaultAction extends ExpandableStringEnum { - /** - * Static value Allow for DefaultAction. - */ - public static final DefaultAction ALLOW = fromString("Allow"); - - /** - * Static value Deny for DefaultAction. - */ - public static final DefaultAction DENY = fromString("Deny"); - - /** - * Creates a new instance of DefaultAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DefaultAction() { - } - - /** - * Creates or finds a DefaultAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding DefaultAction. - */ - public static DefaultAction fromString(String name) { - return fromString(name, DefaultAction.class); - } - - /** - * Gets known DefaultAction values. - * - * @return known DefaultAction values. - */ - public static Collection values() { - return values(DefaultAction.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java deleted file mode 100644 index c75e01bd687a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EncryptionProperty model. - */ -@Fluent -public final class EncryptionProperty implements JsonSerializable { - /* - * Indicates whether or not the encryption is enabled for container registry. - */ - private EncryptionStatus status; - - /* - * Key vault properties. - */ - private KeyVaultProperties keyVaultProperties; - - /** - * Creates an instance of EncryptionProperty class. - */ - public EncryptionProperty() { - } - - /** - * Get the status property: Indicates whether or not the encryption is enabled for container registry. - * - * @return the status value. - */ - public EncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether or not the encryption is enabled for container registry. - * - * @param status the status value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Get the keyVaultProperties property: Key vault properties. - * - * @return the keyVaultProperties value. - */ - public KeyVaultProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: Key vault properties. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionProperty if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EncryptionProperty. - */ - public static EncryptionProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionProperty deserializedEncryptionProperty = new EncryptionProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedEncryptionProperty.status = EncryptionStatus.fromString(reader.getString()); - } else if ("keyVaultProperties".equals(fieldName)) { - deserializedEncryptionProperty.keyVaultProperties = KeyVaultProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionProperty; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java deleted file mode 100644 index 01453fe363b3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether or not the encryption is enabled for container registry. - */ -public final class EncryptionStatus extends ExpandableStringEnum { - /** - * Static value enabled for EncryptionStatus. - */ - public static final EncryptionStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for EncryptionStatus. - */ - public static final EncryptionStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of EncryptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EncryptionStatus() { - } - - /** - * Creates or finds a EncryptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionStatus. - */ - public static EncryptionStatus fromString(String name) { - return fromString(name, EncryptionStatus.class); - } - - /** - * Gets known EncryptionStatus values. - * - * @return known EncryptionStatus values. - */ - public static Collection values() { - return values(EncryptionStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java deleted file mode 100644 index bb37f340847b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner; - -/** - * An immutable client-side representation of Event. - */ -public interface Event { - /** - * Gets the id property: The event ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the eventRequestMessage property: The event request message sent to the service URI. - * - * @return the eventRequestMessage value. - */ - EventRequestMessage eventRequestMessage(); - - /** - * Gets the eventResponseMessage property: The event response message received from the service URI. - * - * @return the eventResponseMessage value. - */ - EventResponseMessage eventResponseMessage(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner object. - * - * @return the inner object. - */ - EventInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java deleted file mode 100644 index 6978909f30d5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The content of the event request message. - */ -@Immutable -public final class EventContent implements JsonSerializable { - /* - * The event ID. - */ - private String id; - - /* - * The time at which the event occurred. - */ - private OffsetDateTime timestamp; - - /* - * The action that encompasses the provided event. - */ - private String action; - - /* - * The target of the event. - */ - private Target target; - - /* - * The request that generated the event. - */ - private Request request; - - /* - * The agent that initiated the event. For most situations, this could be from the authorization context of the - * request. - */ - private Actor actor; - - /* - * The registry node that generated the event. Put differently, while the actor initiates the event, the source - * generates it. - */ - private Source source; - - /** - * Creates an instance of EventContent class. - */ - private EventContent() { - } - - /** - * Get the id property: The event ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the timestamp property: The time at which the event occurred. - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the action property: The action that encompasses the provided event. - * - * @return the action value. - */ - public String action() { - return this.action; - } - - /** - * Get the target property: The target of the event. - * - * @return the target value. - */ - public Target target() { - return this.target; - } - - /** - * Get the request property: The request that generated the event. - * - * @return the request value. - */ - public Request request() { - return this.request; - } - - /** - * Get the actor property: The agent that initiated the event. For most situations, this could be from the - * authorization context of the request. - * - * @return the actor value. - */ - public Actor actor() { - return this.actor; - } - - /** - * Get the source property: The registry node that generated the event. Put differently, while the actor initiates - * the event, the source generates it. - * - * @return the source value. - */ - public Source source() { - return this.source; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("timestamp", - this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); - jsonWriter.writeStringField("action", this.action); - jsonWriter.writeJsonField("target", this.target); - jsonWriter.writeJsonField("request", this.request); - jsonWriter.writeJsonField("actor", this.actor); - jsonWriter.writeJsonField("source", this.source); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventContent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventContent if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventContent. - */ - public static EventContent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventContent deserializedEventContent = new EventContent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEventContent.id = reader.getString(); - } else if ("timestamp".equals(fieldName)) { - deserializedEventContent.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("action".equals(fieldName)) { - deserializedEventContent.action = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedEventContent.target = Target.fromJson(reader); - } else if ("request".equals(fieldName)) { - deserializedEventContent.request = Request.fromJson(reader); - } else if ("actor".equals(fieldName)) { - deserializedEventContent.actor = Actor.fromJson(reader); - } else if ("source".equals(fieldName)) { - deserializedEventContent.source = Source.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEventContent; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java deleted file mode 100644 index c1e265934078..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; - -/** - * An immutable client-side representation of EventInfo. - */ -public interface EventInfo { - /** - * Gets the id property: The event ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner object. - * - * @return the inner object. - */ - EventInfoInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java deleted file mode 100644 index eec3e6e10f48..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The event request message sent to the service URI. - */ -@Immutable -public final class EventRequestMessage implements JsonSerializable { - /* - * The content of the event request message. - */ - private EventContent content; - - /* - * The headers of the event request message. - */ - private Map headers; - - /* - * The HTTP method used to send the event request message. - */ - private String method; - - /* - * The URI used to send the event request message. - */ - private String requestUri; - - /* - * The HTTP message version. - */ - private String version; - - /** - * Creates an instance of EventRequestMessage class. - */ - private EventRequestMessage() { - } - - /** - * Get the content property: The content of the event request message. - * - * @return the content value. - */ - public EventContent content() { - return this.content; - } - - /** - * Get the headers property: The headers of the event request message. - * - * @return the headers value. - */ - public Map headers() { - return this.headers; - } - - /** - * Get the method property: The HTTP method used to send the event request message. - * - * @return the method value. - */ - public String method() { - return this.method; - } - - /** - * Get the requestUri property: The URI used to send the event request message. - * - * @return the requestUri value. - */ - public String requestUri() { - return this.requestUri; - } - - /** - * Get the version property: The HTTP message version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("content", this.content); - jsonWriter.writeMapField("headers", this.headers, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("method", this.method); - jsonWriter.writeStringField("requestUri", this.requestUri); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventRequestMessage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventRequestMessage if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventRequestMessage. - */ - public static EventRequestMessage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventRequestMessage deserializedEventRequestMessage = new EventRequestMessage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("content".equals(fieldName)) { - deserializedEventRequestMessage.content = EventContent.fromJson(reader); - } else if ("headers".equals(fieldName)) { - Map headers = reader.readMap(reader1 -> reader1.getString()); - deserializedEventRequestMessage.headers = headers; - } else if ("method".equals(fieldName)) { - deserializedEventRequestMessage.method = reader.getString(); - } else if ("requestUri".equals(fieldName)) { - deserializedEventRequestMessage.requestUri = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedEventRequestMessage.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventRequestMessage; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java deleted file mode 100644 index 1b9bd9137873..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The event response message received from the service URI. - */ -@Immutable -public final class EventResponseMessage implements JsonSerializable { - /* - * The content of the event response message. - */ - private String content; - - /* - * The headers of the event response message. - */ - private Map headers; - - /* - * The reason phrase of the event response message. - */ - private String reasonPhrase; - - /* - * The status code of the event response message. - */ - private String statusCode; - - /* - * The HTTP message version. - */ - private String version; - - /** - * Creates an instance of EventResponseMessage class. - */ - private EventResponseMessage() { - } - - /** - * Get the content property: The content of the event response message. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Get the headers property: The headers of the event response message. - * - * @return the headers value. - */ - public Map headers() { - return this.headers; - } - - /** - * Get the reasonPhrase property: The reason phrase of the event response message. - * - * @return the reasonPhrase value. - */ - public String reasonPhrase() { - return this.reasonPhrase; - } - - /** - * Get the statusCode property: The status code of the event response message. - * - * @return the statusCode value. - */ - public String statusCode() { - return this.statusCode; - } - - /** - * Get the version property: The HTTP message version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("content", this.content); - jsonWriter.writeMapField("headers", this.headers, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("reasonPhrase", this.reasonPhrase); - jsonWriter.writeStringField("statusCode", this.statusCode); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventResponseMessage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventResponseMessage if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EventResponseMessage. - */ - public static EventResponseMessage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventResponseMessage deserializedEventResponseMessage = new EventResponseMessage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("content".equals(fieldName)) { - deserializedEventResponseMessage.content = reader.getString(); - } else if ("headers".equals(fieldName)) { - Map headers = reader.readMap(reader1 -> reader1.getString()); - deserializedEventResponseMessage.headers = headers; - } else if ("reasonPhrase".equals(fieldName)) { - deserializedEventResponseMessage.reasonPhrase = reader.getString(); - } else if ("statusCode".equals(fieldName)) { - deserializedEventResponseMessage.statusCode = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedEventResponseMessage.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventResponseMessage; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java deleted file mode 100644 index 51f6f0d0416d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The export policy for a container registry. - */ -@Fluent -public final class ExportPolicy implements JsonSerializable { - /* - * The value that indicates whether the policy is enabled or not. - */ - private ExportPolicyStatus status; - - /** - * Creates an instance of ExportPolicy class. - */ - public ExportPolicy() { - } - - /** - * Get the status property: The value that indicates whether the policy is enabled or not. - * - * @return the status value. - */ - public ExportPolicyStatus status() { - return this.status; - } - - /** - * Set the status property: The value that indicates whether the policy is enabled or not. - * - * @param status the status value to set. - * @return the ExportPolicy object itself. - */ - public ExportPolicy withStatus(ExportPolicyStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExportPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExportPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExportPolicy. - */ - public static ExportPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExportPolicy deserializedExportPolicy = new ExportPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedExportPolicy.status = ExportPolicyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExportPolicy; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java deleted file mode 100644 index cc93593e30f0..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The value that indicates whether the policy is enabled or not. - */ -public final class ExportPolicyStatus extends ExpandableStringEnum { - /** - * Static value enabled for ExportPolicyStatus. - */ - public static final ExportPolicyStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for ExportPolicyStatus. - */ - public static final ExportPolicyStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of ExportPolicyStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExportPolicyStatus() { - } - - /** - * Creates or finds a ExportPolicyStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExportPolicyStatus. - */ - public static ExportPolicyStatus fromString(String name) { - return fromString(name, ExportPolicyStatus.class); - } - - /** - * Gets known ExportPolicyStatus values. - * - * @return known ExportPolicyStatus values. - */ - public static Collection values() { - return values(ExportPolicyStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java deleted file mode 100644 index 039587ceb234..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The garbage collection properties of the connected registry. - */ -@Fluent -public final class GarbageCollectionProperties implements JsonSerializable { - /* - * Indicates whether garbage collection is enabled for the connected registry. - */ - private Boolean enabled; - - /* - * The cron expression indicating the schedule that the connected registry will run garbage collection. - */ - private String schedule; - - /** - * Creates an instance of GarbageCollectionProperties class. - */ - public GarbageCollectionProperties() { - } - - /** - * Get the enabled property: Indicates whether garbage collection is enabled for the connected registry. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates whether garbage collection is enabled for the connected registry. - * - * @param enabled the enabled value to set. - * @return the GarbageCollectionProperties object itself. - */ - public GarbageCollectionProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the schedule property: The cron expression indicating the schedule that the connected registry will run - * garbage collection. - * - * @return the schedule value. - */ - public String schedule() { - return this.schedule; - } - - /** - * Set the schedule property: The cron expression indicating the schedule that the connected registry will run - * garbage collection. - * - * @param schedule the schedule value to set. - * @return the GarbageCollectionProperties object itself. - */ - public GarbageCollectionProperties withSchedule(String schedule) { - this.schedule = schedule; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("schedule", this.schedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GarbageCollectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GarbageCollectionProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GarbageCollectionProperties. - */ - public static GarbageCollectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GarbageCollectionProperties deserializedGarbageCollectionProperties = new GarbageCollectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedGarbageCollectionProperties.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("schedule".equals(fieldName)) { - deserializedGarbageCollectionProperties.schedule = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedGarbageCollectionProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java deleted file mode 100644 index c88877f1d202..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The parameters used to generate credentials for a specified token or user of a container registry. - */ -@Fluent -public final class GenerateCredentialsParameters implements JsonSerializable { - /* - * The resource ID of the token for which credentials have to be generated. - */ - private String tokenId; - - /* - * The expiry date of the generated credentials after which the credentials become invalid. - */ - private OffsetDateTime expiry; - - /* - * Specifies name of the password which should be regenerated if any -- password1 or password2. - */ - private TokenPasswordName name; - - /** - * Creates an instance of GenerateCredentialsParameters class. - */ - public GenerateCredentialsParameters() { - } - - /** - * Get the tokenId property: The resource ID of the token for which credentials have to be generated. - * - * @return the tokenId value. - */ - public String tokenId() { - return this.tokenId; - } - - /** - * Set the tokenId property: The resource ID of the token for which credentials have to be generated. - * - * @param tokenId the tokenId value to set. - * @return the GenerateCredentialsParameters object itself. - */ - public GenerateCredentialsParameters withTokenId(String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid. - * - * @return the expiry value. - */ - public OffsetDateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid. - * - * @param expiry the expiry value to set. - * @return the GenerateCredentialsParameters object itself. - */ - public GenerateCredentialsParameters withExpiry(OffsetDateTime expiry) { - this.expiry = expiry; - return this; - } - - /** - * Get the name property: Specifies name of the password which should be regenerated if any -- password1 or - * password2. - * - * @return the name value. - */ - public TokenPasswordName name() { - return this.name; - } - - /** - * Set the name property: Specifies name of the password which should be regenerated if any -- password1 or - * password2. - * - * @param name the name value to set. - * @return the GenerateCredentialsParameters object itself. - */ - public GenerateCredentialsParameters withName(TokenPasswordName name) { - this.name = name; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tokenId", this.tokenId); - jsonWriter.writeStringField("expiry", - this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GenerateCredentialsParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GenerateCredentialsParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GenerateCredentialsParameters. - */ - public static GenerateCredentialsParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GenerateCredentialsParameters deserializedGenerateCredentialsParameters - = new GenerateCredentialsParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tokenId".equals(fieldName)) { - deserializedGenerateCredentialsParameters.tokenId = reader.getString(); - } else if ("expiry".equals(fieldName)) { - deserializedGenerateCredentialsParameters.expiry = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("name".equals(fieldName)) { - deserializedGenerateCredentialsParameters.name = TokenPasswordName.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedGenerateCredentialsParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java deleted file mode 100644 index 248e3aceacc5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner; -import java.util.List; - -/** - * An immutable client-side representation of GenerateCredentialsResult. - */ -public interface GenerateCredentialsResult { - /** - * Gets the username property: The username for a container registry. - * - * @return the username value. - */ - String username(); - - /** - * Gets the passwords property: The list of passwords for a container registry. - * - * @return the passwords value. - */ - List passwords(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner - * object. - * - * @return the inner object. - */ - GenerateCredentialsResultInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java deleted file mode 100644 index c045b5e2d35c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP rule with specific IP or IP range in CIDR format. - */ -@Fluent -public final class IPRule implements JsonSerializable { - /* - * The action of IP ACL rule. - */ - private Action action; - - /* - * Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. - */ - private String iPAddressOrRange; - - /** - * Creates an instance of IPRule class. - */ - public IPRule() { - } - - /** - * Get the action property: The action of IP ACL rule. - * - * @return the action value. - */ - public Action action() { - return this.action; - } - - /** - * Set the action property: The action of IP ACL rule. - * - * @param action the action value to set. - * @return the IPRule object itself. - */ - public IPRule withAction(Action action) { - this.action = action; - return this; - } - - /** - * Get the iPAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. - * - * @return the iPAddressOrRange value. - */ - public String iPAddressOrRange() { - return this.iPAddressOrRange; - } - - /** - * Set the iPAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. - * - * @param iPAddressOrRange the iPAddressOrRange value to set. - * @return the IPRule object itself. - */ - public IPRule withIPAddressOrRange(String iPAddressOrRange) { - this.iPAddressOrRange = iPAddressOrRange; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("value", this.iPAddressOrRange); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IPRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IPRule if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IPRule. - */ - public static IPRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IPRule deserializedIPRule = new IPRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedIPRule.iPAddressOrRange = reader.getString(); - } else if ("action".equals(fieldName)) { - deserializedIPRule.action = Action.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIPRule; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java deleted file mode 100644 index ca93b58cf293..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed identity for the resource. - */ -@Fluent -public final class IdentityProperties implements JsonSerializable { - /* - * The principal ID of resource identity. - */ - private String principalId; - - /* - * The tenant ID of resource. - */ - private String tenantId; - - /* - * The identity type. - */ - private ResourceIdentityType type; - - /* - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of IdentityProperties class. - */ - public IdentityProperties() { - } - - /** - * Get the principalId property: The principal ID of resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The list of user identities associated with the resource. The user - * identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The list of user identities associated with the resource. The user - * identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityProperties. - */ - public static IdentityProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityProperties deserializedIdentityProperties = new IdentityProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedIdentityProperties.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedIdentityProperties.tenantId = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedIdentityProperties.type = ResourceIdentityType.fromString(reader.getString()); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserIdentityProperties.fromJson(reader1)); - deserializedIdentityProperties.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java deleted file mode 100644 index f95903ad62e4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ImportImageParameters model. - */ -@Fluent -public final class ImportImageParameters implements JsonSerializable { - /* - * The source of the image. - */ - private ImportSource source; - - /* - * List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is - * also omitted). - */ - private List targetTags; - - /* - * List of strings of repository names to do a manifest only copy. No tag will be created. - */ - private List untaggedTargetRepositories; - - /* - * When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the - * operation before any copying begins. - */ - private ImportMode mode; - - /** - * Creates an instance of ImportImageParameters class. - */ - public ImportImageParameters() { - } - - /** - * Get the source property: The source of the image. - * - * @return the source value. - */ - public ImportSource source() { - return this.source; - } - - /** - * Set the source property: The source of the image. - * - * @param source the source value to set. - * @return the ImportImageParameters object itself. - */ - public ImportImageParameters withSource(ImportSource source) { - this.source = source; - return this; - } - - /** - * Get the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used - * (or 'latest' if source tag is also omitted). - * - * @return the targetTags value. - */ - public List targetTags() { - return this.targetTags; - } - - /** - * Set the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used - * (or 'latest' if source tag is also omitted). - * - * @param targetTags the targetTags value to set. - * @return the ImportImageParameters object itself. - */ - public ImportImageParameters withTargetTags(List targetTags) { - this.targetTags = targetTags; - return this; - } - - /** - * Get the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No - * tag will be created. - * - * @return the untaggedTargetRepositories value. - */ - public List untaggedTargetRepositories() { - return this.untaggedTargetRepositories; - } - - /** - * Set the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No - * tag will be created. - * - * @param untaggedTargetRepositories the untaggedTargetRepositories value to set. - * @return the ImportImageParameters object itself. - */ - public ImportImageParameters withUntaggedTargetRepositories(List untaggedTargetRepositories) { - this.untaggedTargetRepositories = untaggedTargetRepositories; - return this; - } - - /** - * Get the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing - * target tags will fail the operation before any copying begins. - * - * @return the mode value. - */ - public ImportMode mode() { - return this.mode; - } - - /** - * Set the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing - * target tags will fail the operation before any copying begins. - * - * @param mode the mode value to set. - * @return the ImportImageParameters object itself. - */ - public ImportImageParameters withMode(ImportMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("source", this.source); - jsonWriter.writeArrayField("targetTags", this.targetTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("untaggedTargetRepositories", this.untaggedTargetRepositories, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImportImageParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImportImageParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImportImageParameters. - */ - public static ImportImageParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImportImageParameters deserializedImportImageParameters = new ImportImageParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedImportImageParameters.source = ImportSource.fromJson(reader); - } else if ("targetTags".equals(fieldName)) { - List targetTags = reader.readArray(reader1 -> reader1.getString()); - deserializedImportImageParameters.targetTags = targetTags; - } else if ("untaggedTargetRepositories".equals(fieldName)) { - List untaggedTargetRepositories = reader.readArray(reader1 -> reader1.getString()); - deserializedImportImageParameters.untaggedTargetRepositories = untaggedTargetRepositories; - } else if ("mode".equals(fieldName)) { - deserializedImportImageParameters.mode = ImportMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedImportImageParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java deleted file mode 100644 index 771071086253..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the - * operation before any copying begins. - */ -public final class ImportMode extends ExpandableStringEnum { - /** - * Static value NoForce for ImportMode. - */ - public static final ImportMode NO_FORCE = fromString("NoForce"); - - /** - * Static value Force for ImportMode. - */ - public static final ImportMode FORCE = fromString("Force"); - - /** - * Creates a new instance of ImportMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ImportMode() { - } - - /** - * Creates or finds a ImportMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ImportMode. - */ - public static ImportMode fromString(String name) { - return fromString(name, ImportMode.class); - } - - /** - * Gets known ImportMode values. - * - * @return known ImportMode values. - */ - public static Collection values() { - return values(ImportMode.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java deleted file mode 100644 index 116b46b62d96..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ImportSource model. - */ -@Fluent -public final class ImportSource implements JsonSerializable { - /* - * The resource identifier of the source Azure Container Registry. - */ - private String resourceId; - - /* - * The address of the source registry (e.g. 'mcr.microsoft.com'). - */ - private String registryUri; - - /* - * Credentials used when importing from a registry uri. - */ - private ImportSourceCredentials credentials; - - /* - * Repository name of the source image. - * Specify an image by repository ('hello-world'). This will use the 'latest' tag. - * Specify an image by tag ('hello-world:latest'). - * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - */ - private String sourceImage; - - /** - * Creates an instance of ImportSource class. - */ - public ImportSource() { - } - - /** - * Get the resourceId property: The resource identifier of the source Azure Container Registry. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resource identifier of the source Azure Container Registry. - * - * @param resourceId the resourceId value to set. - * @return the ImportSource object itself. - */ - public ImportSource withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com'). - * - * @return the registryUri value. - */ - public String registryUri() { - return this.registryUri; - } - - /** - * Set the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com'). - * - * @param registryUri the registryUri value to set. - * @return the ImportSource object itself. - */ - public ImportSource withRegistryUri(String registryUri) { - this.registryUri = registryUri; - return this; - } - - /** - * Get the credentials property: Credentials used when importing from a registry uri. - * - * @return the credentials value. - */ - public ImportSourceCredentials credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Credentials used when importing from a registry uri. - * - * @param credentials the credentials value to set. - * @return the ImportSource object itself. - */ - public ImportSource withCredentials(ImportSourceCredentials credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the sourceImage property: Repository name of the source image. - * Specify an image by repository ('hello-world'). This will use the 'latest' tag. - * Specify an image by tag ('hello-world:latest'). - * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - * - * @return the sourceImage value. - */ - public String sourceImage() { - return this.sourceImage; - } - - /** - * Set the sourceImage property: Repository name of the source image. - * Specify an image by repository ('hello-world'). This will use the 'latest' tag. - * Specify an image by tag ('hello-world:latest'). - * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - * - * @param sourceImage the sourceImage value to set. - * @return the ImportSource object itself. - */ - public ImportSource withSourceImage(String sourceImage) { - this.sourceImage = sourceImage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceImage", this.sourceImage); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("registryUri", this.registryUri); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImportSource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImportSource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImportSource. - */ - public static ImportSource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImportSource deserializedImportSource = new ImportSource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceImage".equals(fieldName)) { - deserializedImportSource.sourceImage = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedImportSource.resourceId = reader.getString(); - } else if ("registryUri".equals(fieldName)) { - deserializedImportSource.registryUri = reader.getString(); - } else if ("credentials".equals(fieldName)) { - deserializedImportSource.credentials = ImportSourceCredentials.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedImportSource; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java deleted file mode 100644 index 5b2b2ff7a29c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ImportSourceCredentials model. - */ -@Fluent -public final class ImportSourceCredentials implements JsonSerializable { - /* - * The username to authenticate with the source registry. - */ - private String username; - - /* - * The password used to authenticate with the source registry. - */ - private String password; - - /** - * Creates an instance of ImportSourceCredentials class. - */ - public ImportSourceCredentials() { - } - - /** - * Get the username property: The username to authenticate with the source registry. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The username to authenticate with the source registry. - * - * @param username the username value to set. - * @return the ImportSourceCredentials object itself. - */ - public ImportSourceCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password used to authenticate with the source registry. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password used to authenticate with the source registry. - * - * @param password the password value to set. - * @return the ImportSourceCredentials object itself. - */ - public ImportSourceCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("username", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImportSourceCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImportSourceCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImportSourceCredentials. - */ - public static ImportSourceCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImportSourceCredentials deserializedImportSourceCredentials = new ImportSourceCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("password".equals(fieldName)) { - deserializedImportSourceCredentials.password = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedImportSourceCredentials.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImportSourceCredentials; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java deleted file mode 100644 index 750ad5e997df..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The KeyVaultProperties model. - */ -@Fluent -public final class KeyVaultProperties implements JsonSerializable { - /* - * Key vault uri to access the encryption key. - */ - private String keyIdentifier; - - /* - * The fully qualified key identifier that includes the version of the key that is actually used for encryption. - */ - private String versionedKeyIdentifier; - - /* - * The client id of the identity which will be used to access key vault. - */ - private String identity; - - /* - * Auto key rotation status for a CMK enabled registry. - */ - private Boolean keyRotationEnabled; - - /* - * Timestamp of the last successful key rotation. - */ - private OffsetDateTime lastKeyRotationTimestamp; - - /** - * Creates an instance of KeyVaultProperties class. - */ - public KeyVaultProperties() { - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the versionedKeyIdentifier property: The fully qualified key identifier that includes the version of the key - * that is actually used for encryption. - * - * @return the versionedKeyIdentifier value. - */ - public String versionedKeyIdentifier() { - return this.versionedKeyIdentifier; - } - - /** - * Get the identity property: The client id of the identity which will be used to access key vault. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: The client id of the identity which will be used to access key vault. - * - * @param identity the identity value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyRotationEnabled property: Auto key rotation status for a CMK enabled registry. - * - * @return the keyRotationEnabled value. - */ - public Boolean keyRotationEnabled() { - return this.keyRotationEnabled; - } - - /** - * Get the lastKeyRotationTimestamp property: Timestamp of the last successful key rotation. - * - * @return the lastKeyRotationTimestamp value. - */ - public OffsetDateTime lastKeyRotationTimestamp() { - return this.lastKeyRotationTimestamp; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KeyVaultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KeyVaultProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the KeyVaultProperties. - */ - public static KeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KeyVaultProperties deserializedKeyVaultProperties = new KeyVaultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyIdentifier".equals(fieldName)) { - deserializedKeyVaultProperties.keyIdentifier = reader.getString(); - } else if ("versionedKeyIdentifier".equals(fieldName)) { - deserializedKeyVaultProperties.versionedKeyIdentifier = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedKeyVaultProperties.identity = reader.getString(); - } else if ("keyRotationEnabled".equals(fieldName)) { - deserializedKeyVaultProperties.keyRotationEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("lastKeyRotationTimestamp".equals(fieldName)) { - deserializedKeyVaultProperties.lastKeyRotationTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedKeyVaultProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java deleted file mode 100644 index 7706914ffe72..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The verbosity of logs persisted on the connected registry. - */ -public final class LogLevel extends ExpandableStringEnum { - /** - * Static value Debug for LogLevel. - */ - public static final LogLevel DEBUG = fromString("Debug"); - - /** - * Static value Information for LogLevel. - */ - public static final LogLevel INFORMATION = fromString("Information"); - - /** - * Static value Warning for LogLevel. - */ - public static final LogLevel WARNING = fromString("Warning"); - - /** - * Static value Error for LogLevel. - */ - public static final LogLevel ERROR = fromString("Error"); - - /** - * Static value None for LogLevel. - */ - public static final LogLevel NONE = fromString("None"); - - /** - * Creates a new instance of LogLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogLevel() { - } - - /** - * Creates or finds a LogLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogLevel. - */ - public static LogLevel fromString(String name) { - return fromString(name, LogLevel.class); - } - - /** - * Gets known LogLevel values. - * - * @return known LogLevel values. - */ - public static Collection values() { - return values(LogLevel.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java deleted file mode 100644 index c58292e7032b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The logging properties of the connected registry. - */ -@Fluent -public final class LoggingProperties implements JsonSerializable { - /* - * The verbosity of logs persisted on the connected registry. - */ - private LogLevel logLevel; - - /* - * Indicates whether audit logs are enabled on the connected registry. - */ - private AuditLogStatus auditLogStatus; - - /** - * Creates an instance of LoggingProperties class. - */ - public LoggingProperties() { - } - - /** - * Get the logLevel property: The verbosity of logs persisted on the connected registry. - * - * @return the logLevel value. - */ - public LogLevel logLevel() { - return this.logLevel; - } - - /** - * Set the logLevel property: The verbosity of logs persisted on the connected registry. - * - * @param logLevel the logLevel value to set. - * @return the LoggingProperties object itself. - */ - public LoggingProperties withLogLevel(LogLevel logLevel) { - this.logLevel = logLevel; - return this; - } - - /** - * Get the auditLogStatus property: Indicates whether audit logs are enabled on the connected registry. - * - * @return the auditLogStatus value. - */ - public AuditLogStatus auditLogStatus() { - return this.auditLogStatus; - } - - /** - * Set the auditLogStatus property: Indicates whether audit logs are enabled on the connected registry. - * - * @param auditLogStatus the auditLogStatus value to set. - * @return the LoggingProperties object itself. - */ - public LoggingProperties withAuditLogStatus(AuditLogStatus auditLogStatus) { - this.auditLogStatus = auditLogStatus; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); - jsonWriter.writeStringField("auditLogStatus", - this.auditLogStatus == null ? null : this.auditLogStatus.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoggingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoggingProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LoggingProperties. - */ - public static LoggingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoggingProperties deserializedLoggingProperties = new LoggingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logLevel".equals(fieldName)) { - deserializedLoggingProperties.logLevel = LogLevel.fromString(reader.getString()); - } else if ("auditLogStatus".equals(fieldName)) { - deserializedLoggingProperties.auditLogStatus = AuditLogStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLoggingProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java deleted file mode 100644 index 436d62b93de6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The login server properties of the connected registry. - */ -@Immutable -public final class LoginServerProperties implements JsonSerializable { - /* - * The host of the connected registry. Can be FQDN or IP. - */ - private String host; - - /* - * The TLS properties of the connected registry login server. - */ - private TlsProperties tls; - - /** - * Creates an instance of LoginServerProperties class. - */ - public LoginServerProperties() { - } - - /** - * Get the host property: The host of the connected registry. Can be FQDN or IP. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Get the tls property: The TLS properties of the connected registry login server. - * - * @return the tls value. - */ - public TlsProperties tls() { - return this.tls; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoginServerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoginServerProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LoginServerProperties. - */ - public static LoginServerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoginServerProperties deserializedLoginServerProperties = new LoginServerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("host".equals(fieldName)) { - deserializedLoginServerProperties.host = reader.getString(); - } else if ("tls".equals(fieldName)) { - deserializedLoginServerProperties.tls = TlsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLoginServerProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java deleted file mode 100644 index b46a59e755c7..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether to allow trusted Azure services to access a network restricted registry. - */ -public final class NetworkRuleBypassOptions extends ExpandableStringEnum { - /** - * Static value AzureServices for NetworkRuleBypassOptions. - */ - public static final NetworkRuleBypassOptions AZURE_SERVICES = fromString("AzureServices"); - - /** - * Static value None for NetworkRuleBypassOptions. - */ - public static final NetworkRuleBypassOptions NONE = fromString("None"); - - /** - * Creates a new instance of NetworkRuleBypassOptions value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkRuleBypassOptions() { - } - - /** - * Creates or finds a NetworkRuleBypassOptions from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkRuleBypassOptions. - */ - public static NetworkRuleBypassOptions fromString(String name) { - return fromString(name, NetworkRuleBypassOptions.class); - } - - /** - * Gets known NetworkRuleBypassOptions values. - * - * @return known NetworkRuleBypassOptions values. - */ - public static Collection values() { - return values(NetworkRuleBypassOptions.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java deleted file mode 100644 index 372fda0727e6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The network rule set for a container registry. - */ -@Fluent -public final class NetworkRuleSet implements JsonSerializable { - /* - * The default action of allow or deny when no other rules match. - */ - private DefaultAction defaultAction; - - /* - * The IP ACL rules. - */ - private List ipRules; - - /** - * Creates an instance of NetworkRuleSet class. - */ - public NetworkRuleSet() { - } - - /** - * Get the defaultAction property: The default action of allow or deny when no other rules match. - * - * @return the defaultAction value. - */ - public DefaultAction defaultAction() { - return this.defaultAction; - } - - /** - * Set the defaultAction property: The default action of allow or deny when no other rules match. - * - * @param defaultAction the defaultAction value to set. - * @return the NetworkRuleSet object itself. - */ - public NetworkRuleSet withDefaultAction(DefaultAction defaultAction) { - this.defaultAction = defaultAction; - return this; - } - - /** - * Get the ipRules property: The IP ACL rules. - * - * @return the ipRules value. - */ - public List ipRules() { - return this.ipRules; - } - - /** - * Set the ipRules property: The IP ACL rules. - * - * @param ipRules the ipRules value to set. - * @return the NetworkRuleSet object itself. - */ - public NetworkRuleSet withIpRules(List ipRules) { - this.ipRules = ipRules; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); - jsonWriter.writeArrayField("ipRules", this.ipRules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkRuleSet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkRuleSet if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NetworkRuleSet. - */ - public static NetworkRuleSet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkRuleSet deserializedNetworkRuleSet = new NetworkRuleSet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("defaultAction".equals(fieldName)) { - deserializedNetworkRuleSet.defaultAction = DefaultAction.fromString(reader.getString()); - } else if ("ipRules".equals(fieldName)) { - List ipRules = reader.readArray(reader1 -> IPRule.fromJson(reader1)); - deserializedNetworkRuleSet.ipRules = ipRules; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkRuleSet; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java deleted file mode 100644 index 32b7129f0719..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; - -/** - * An immutable client-side representation of OperationDefinition. - */ -public interface OperationDefinition { - /** - * Gets the origin property: The origin information of the container registry operation. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: The display information for the container registry operation. - * - * @return the display value. - */ - OperationDisplayDefinition display(); - - /** - * Gets the isDataAction property: This property indicates if the operation is an action or a data action - * ref: - * https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the serviceSpecification property: The definition of Azure Monitoring service. - * - * @return the serviceSpecification value. - */ - OperationServiceSpecificationDefinition serviceSpecification(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner - * object. - * - * @return the inner object. - */ - OperationDefinitionInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java deleted file mode 100644 index 556dccf4c295..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The display information for a container registry operation. - */ -@Immutable -public final class OperationDisplayDefinition implements JsonSerializable { - /* - * The resource provider name: Microsoft.ContainerRegistry. - */ - private String provider; - - /* - * The resource on which the operation is performed. - */ - private String resource; - - /* - * The operation that users can perform. - */ - private String operation; - - /* - * The description for the operation. - */ - private String description; - - /** - * Creates an instance of OperationDisplayDefinition class. - */ - private OperationDisplayDefinition() { - } - - /** - * Get the provider property: The resource provider name: Microsoft.ContainerRegistry. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The resource on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The operation that users can perform. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provider", this.provider); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeStringField("operation", this.operation); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplayDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplayDefinition if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplayDefinition. - */ - public static OperationDisplayDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplayDefinition deserializedOperationDisplayDefinition = new OperationDisplayDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplayDefinition.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplayDefinition.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplayDefinition.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplayDefinition.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplayDefinition; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java deleted file mode 100644 index f0b7ae0a0777..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The definition of Azure Monitoring log. - */ -@Immutable -public final class OperationLogSpecificationDefinition - implements JsonSerializable { - /* - * Log name. - */ - private String name; - - /* - * Log display name. - */ - private String displayName; - - /* - * Log blob duration. - */ - private String blobDuration; - - /** - * Creates an instance of OperationLogSpecificationDefinition class. - */ - private OperationLogSpecificationDefinition() { - } - - /** - * Get the name property: Log name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the displayName property: Log display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the blobDuration property: Log blob duration. - * - * @return the blobDuration value. - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("blobDuration", this.blobDuration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationLogSpecificationDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationLogSpecificationDefinition if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationLogSpecificationDefinition. - */ - public static OperationLogSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationLogSpecificationDefinition deserializedOperationLogSpecificationDefinition - = new OperationLogSpecificationDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationLogSpecificationDefinition.name = reader.getString(); - } else if ("displayName".equals(fieldName)) { - deserializedOperationLogSpecificationDefinition.displayName = reader.getString(); - } else if ("blobDuration".equals(fieldName)) { - deserializedOperationLogSpecificationDefinition.blobDuration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationLogSpecificationDefinition; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java deleted file mode 100644 index 4dc87249a8f3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The definition of Azure Monitoring metric. - */ -@Immutable -public final class OperationMetricSpecificationDefinition - implements JsonSerializable { - /* - * Metric name. - */ - private String name; - - /* - * Metric display name. - */ - private String displayName; - - /* - * Metric description. - */ - private String displayDescription; - - /* - * Metric unit. - */ - private String unit; - - /* - * Metric aggregation type. - */ - private String aggregationType; - - /* - * Internal metric name. - */ - private String internalMetricName; - - /** - * Creates an instance of OperationMetricSpecificationDefinition class. - */ - private OperationMetricSpecificationDefinition() { - } - - /** - * Get the name property: Metric name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the displayName property: Metric display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the displayDescription property: Metric description. - * - * @return the displayDescription value. - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Get the unit property: Metric unit. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Get the aggregationType property: Metric aggregation type. - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Get the internalMetricName property: Internal metric name. - * - * @return the internalMetricName value. - */ - public String internalMetricName() { - return this.internalMetricName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("displayDescription", this.displayDescription); - jsonWriter.writeStringField("unit", this.unit); - jsonWriter.writeStringField("aggregationType", this.aggregationType); - jsonWriter.writeStringField("internalMetricName", this.internalMetricName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationMetricSpecificationDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationMetricSpecificationDefinition if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationMetricSpecificationDefinition. - */ - public static OperationMetricSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationMetricSpecificationDefinition deserializedOperationMetricSpecificationDefinition - = new OperationMetricSpecificationDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.name = reader.getString(); - } else if ("displayName".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.displayName = reader.getString(); - } else if ("displayDescription".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.displayDescription = reader.getString(); - } else if ("unit".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.unit = reader.getString(); - } else if ("aggregationType".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.aggregationType = reader.getString(); - } else if ("internalMetricName".equals(fieldName)) { - deserializedOperationMetricSpecificationDefinition.internalMetricName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationMetricSpecificationDefinition; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java deleted file mode 100644 index 03f696c779b2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The definition of Azure Monitoring list. - */ -@Immutable -public final class OperationServiceSpecificationDefinition - implements JsonSerializable { - /* - * A list of Azure Monitoring metrics definition. - */ - private List metricSpecifications; - - /* - * A list of Azure Monitoring log definitions. - */ - private List logSpecifications; - - /** - * Creates an instance of OperationServiceSpecificationDefinition class. - */ - private OperationServiceSpecificationDefinition() { - } - - /** - * Get the metricSpecifications property: A list of Azure Monitoring metrics definition. - * - * @return the metricSpecifications value. - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Get the logSpecifications property: A list of Azure Monitoring log definitions. - * - * @return the logSpecifications value. - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("metricSpecifications", this.metricSpecifications, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("logSpecifications", this.logSpecifications, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationServiceSpecificationDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationServiceSpecificationDefinition if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationServiceSpecificationDefinition. - */ - public static OperationServiceSpecificationDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationServiceSpecificationDefinition deserializedOperationServiceSpecificationDefinition - = new OperationServiceSpecificationDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metricSpecifications".equals(fieldName)) { - List metricSpecifications - = reader.readArray(reader1 -> OperationMetricSpecificationDefinition.fromJson(reader1)); - deserializedOperationServiceSpecificationDefinition.metricSpecifications = metricSpecifications; - } else if ("logSpecifications".equals(fieldName)) { - List logSpecifications - = reader.readArray(reader1 -> OperationLogSpecificationDefinition.fromJson(reader1)); - deserializedOperationServiceSpecificationDefinition.logSpecifications = logSpecifications; - } else { - reader.skipChildren(); - } - } - - return deserializedOperationServiceSpecificationDefinition; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java deleted file mode 100644 index 132fd1396e77..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @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 result of a request to list container registry operations as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java deleted file mode 100644 index 1207b17cf8e0..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of the connected registry parent. - */ -@Fluent -public final class ParentProperties implements JsonSerializable { - /* - * The resource ID of the parent to which the connected registry will be associated. - */ - private String id; - - /* - * The sync properties of the connected registry with its parent. - */ - private SyncProperties syncProperties; - - /** - * Creates an instance of ParentProperties class. - */ - public ParentProperties() { - } - - /** - * Get the id property: The resource ID of the parent to which the connected registry will be associated. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The resource ID of the parent to which the connected registry will be associated. - * - * @param id the id value to set. - * @return the ParentProperties object itself. - */ - public ParentProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the syncProperties property: The sync properties of the connected registry with its parent. - * - * @return the syncProperties value. - */ - public SyncProperties syncProperties() { - return this.syncProperties; - } - - /** - * Set the syncProperties property: The sync properties of the connected registry with its parent. - * - * @param syncProperties the syncProperties value to set. - * @return the ParentProperties object itself. - */ - public ParentProperties withSyncProperties(SyncProperties syncProperties) { - this.syncProperties = syncProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("syncProperties", this.syncProperties); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ParentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ParentProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ParentProperties. - */ - public static ParentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ParentProperties deserializedParentProperties = new ParentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("syncProperties".equals(fieldName)) { - deserializedParentProperties.syncProperties = SyncProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedParentProperties.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedParentProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java deleted file mode 100644 index e2e7a71b068c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -/** - * The password name. - */ -public enum PasswordName { - /** - * Enum value password. - */ - PASSWORD("password"), - - /** - * Enum value password2. - */ - PASSWORD2("password2"); - - /** - * The actual serialized value for a PasswordName instance. - */ - private final String value; - - PasswordName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a PasswordName instance. - * - * @param value the serialized value to parse. - * @return the parsed PasswordName object, or null if unable to parse. - */ - public static PasswordName fromString(String value) { - if (value == null) { - return null; - } - PasswordName[] items = PasswordName.values(); - for (PasswordName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java deleted file mode 100644 index 09f636a613f2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The policies for a container registry. - */ -@Fluent -public final class Policies implements JsonSerializable { - /* - * The quarantine policy for a container registry. - */ - private QuarantinePolicy quarantinePolicy; - - /* - * The content trust policy for a container registry. - */ - private TrustPolicy trustPolicy; - - /* - * The retention policy for a container registry. - */ - private RetentionPolicy retentionPolicy; - - /* - * The export policy for a container registry. - */ - private ExportPolicy exportPolicy; - - /* - * The policy for using Azure Resource Manager audience token for a container registry. - */ - private AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy; - - /** - * Creates an instance of Policies class. - */ - public Policies() { - } - - /** - * Get the quarantinePolicy property: The quarantine policy for a container registry. - * - * @return the quarantinePolicy value. - */ - public QuarantinePolicy quarantinePolicy() { - return this.quarantinePolicy; - } - - /** - * Set the quarantinePolicy property: The quarantine policy for a container registry. - * - * @param quarantinePolicy the quarantinePolicy value to set. - * @return the Policies object itself. - */ - public Policies withQuarantinePolicy(QuarantinePolicy quarantinePolicy) { - this.quarantinePolicy = quarantinePolicy; - return this; - } - - /** - * Get the trustPolicy property: The content trust policy for a container registry. - * - * @return the trustPolicy value. - */ - public TrustPolicy trustPolicy() { - return this.trustPolicy; - } - - /** - * Set the trustPolicy property: The content trust policy for a container registry. - * - * @param trustPolicy the trustPolicy value to set. - * @return the Policies object itself. - */ - public Policies withTrustPolicy(TrustPolicy trustPolicy) { - this.trustPolicy = trustPolicy; - return this; - } - - /** - * Get the retentionPolicy property: The retention policy for a container registry. - * - * @return the retentionPolicy value. - */ - public RetentionPolicy retentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy property: The retention policy for a container registry. - * - * @param retentionPolicy the retentionPolicy value to set. - * @return the Policies object itself. - */ - public Policies withRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Get the exportPolicy property: The export policy for a container registry. - * - * @return the exportPolicy value. - */ - public ExportPolicy exportPolicy() { - return this.exportPolicy; - } - - /** - * Set the exportPolicy property: The export policy for a container registry. - * - * @param exportPolicy the exportPolicy value to set. - * @return the Policies object itself. - */ - public Policies withExportPolicy(ExportPolicy exportPolicy) { - this.exportPolicy = exportPolicy; - return this; - } - - /** - * Get the azureADAuthenticationAsArmPolicy property: The policy for using Azure Resource Manager audience token for - * a container registry. - * - * @return the azureADAuthenticationAsArmPolicy value. - */ - public AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy() { - return this.azureADAuthenticationAsArmPolicy; - } - - /** - * Set the azureADAuthenticationAsArmPolicy property: The policy for using Azure Resource Manager audience token for - * a container registry. - * - * @param azureADAuthenticationAsArmPolicy the azureADAuthenticationAsArmPolicy value to set. - * @return the Policies object itself. - */ - public Policies - withAzureADAuthenticationAsArmPolicy(AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy) { - this.azureADAuthenticationAsArmPolicy = azureADAuthenticationAsArmPolicy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("quarantinePolicy", this.quarantinePolicy); - jsonWriter.writeJsonField("trustPolicy", this.trustPolicy); - jsonWriter.writeJsonField("retentionPolicy", this.retentionPolicy); - jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); - jsonWriter.writeJsonField("azureADAuthenticationAsArmPolicy", this.azureADAuthenticationAsArmPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Policies from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Policies if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Policies. - */ - public static Policies fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Policies deserializedPolicies = new Policies(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("quarantinePolicy".equals(fieldName)) { - deserializedPolicies.quarantinePolicy = QuarantinePolicy.fromJson(reader); - } else if ("trustPolicy".equals(fieldName)) { - deserializedPolicies.trustPolicy = TrustPolicy.fromJson(reader); - } else if ("retentionPolicy".equals(fieldName)) { - deserializedPolicies.retentionPolicy = RetentionPolicy.fromJson(reader); - } else if ("exportPolicy".equals(fieldName)) { - deserializedPolicies.exportPolicy = ExportPolicy.fromJson(reader); - } else if ("azureADAuthenticationAsArmPolicy".equals(fieldName)) { - deserializedPolicies.azureADAuthenticationAsArmPolicy - = AzureADAuthenticationAsArmPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicies; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java deleted file mode 100644 index 3002fdef12ea..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The value that indicates whether the policy is enabled or not. - */ -public final class PolicyStatus extends ExpandableStringEnum { - /** - * Static value enabled for PolicyStatus. - */ - public static final PolicyStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for PolicyStatus. - */ - public static final PolicyStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of PolicyStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PolicyStatus() { - } - - /** - * Creates or finds a PolicyStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PolicyStatus. - */ - public static PolicyStatus fromString(String name) { - return fromString(name, PolicyStatus.class); - } - - /** - * Gets known PolicyStatus values. - * - * @return known PolicyStatus values. - */ - public static Collection values() { - return values(PolicyStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java deleted file mode 100644 index 4d3a382144b2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Private Endpoint resource. - */ -@Fluent -public final class PrivateEndpoint implements JsonSerializable { - /* - * This is private endpoint resource created with Microsoft.Network resource provider. - */ - private String id; - - /** - * Creates an instance of PrivateEndpoint class. - */ - public PrivateEndpoint() { - } - - /** - * Get the id property: This is private endpoint resource created with Microsoft.Network resource provider. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: This is private endpoint resource created with Microsoft.Network resource provider. - * - * @param id the id value to set. - * @return the PrivateEndpoint object itself. - */ - public PrivateEndpoint withId(String id) { - this.id = id; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java deleted file mode 100644 index 936e2ac6a1ea..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; - -/** - * An immutable client-side representation of PrivateEndpointConnection. - */ -public interface PrivateEndpointConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of a private endpoint connection. - * - * @return the properties value. - */ - PrivateEndpointConnectionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner - * object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); - - /** - * The entirety of the PrivateEndpointConnection definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The PrivateEndpointConnection definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the PrivateEndpointConnection definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the PrivateEndpointConnection 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnection create(Context context); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of a private endpoint connection.. - * - * @param properties The properties of a private endpoint connection. - * @return the next definition stage. - */ - WithCreate withProperties(PrivateEndpointConnectionProperties properties); - } - } - - /** - * Begins update for the PrivateEndpointConnection resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnection.Update update(); - - /** - * The template for PrivateEndpointConnection update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnection apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnection apply(Context context); - } - - /** - * The PrivateEndpointConnection update stages. - */ - interface UpdateStages { - /** - * The stage of the PrivateEndpointConnection update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of a private endpoint connection.. - * - * @param properties The properties of a private endpoint connection. - * @return the next definition stage. - */ - Update withProperties(PrivateEndpointConnectionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index d81e706f6f86..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of a private endpoint connection. - */ -@Fluent -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The resource of private endpoint. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of private endpoint connection resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of PrivateEndpointConnectionProperties class. - */ - public PrivateEndpointConnectionProperties() { - } - - /** - * Get the privateEndpoint property: The resource of private endpoint. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private endpoint. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of private endpoint connection resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java deleted file mode 100644 index 8267ec5c5024..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 PrivateEndpointConnections. - */ -public interface PrivateEndpointConnections { - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, - String privateEndpointConnectionName, Context context); - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 specified private endpoint connection associated with the container registry. - */ - PrivateEndpointConnection get(String resourceGroupName, String registryName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 registryName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, Context context); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response}. - */ - PrivateEndpointConnection getById(String id); - - /** - * Get the specified private endpoint connection associated with the container registry. - * - * @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 specified private endpoint connection associated with the container registry along with - * {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @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); - - /** - * Deletes the specified private endpoint connection associated with the container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java deleted file mode 100644 index af0b788122cc..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; - -/** - * An immutable client-side representation of PrivateLinkResource. - */ -public interface PrivateLinkResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: A resource that supports private link capabilities. - * - * @return the properties value. - */ - PrivateLinkResourceProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner - * object. - * - * @return the inner object. - */ - PrivateLinkResourceInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java deleted file mode 100644 index cfb9f77a34bd..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a private link resource. - */ -@Immutable -public final class PrivateLinkResourceProperties implements JsonSerializable { - /* - * The private link resource group id. - */ - private String groupId; - - /* - * The private link resource required member names. - */ - private List requiredMembers; - - /* - * The private link resource private link DNS zone name. - */ - private List requiredZoneNames; - - /** - * Creates an instance of PrivateLinkResourceProperties class. - */ - private PrivateLinkResourceProperties() { - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. - */ - public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties - = new PrivateLinkResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; - } else if ("requiredZoneNames".equals(fieldName)) { - List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index a18b2f8bea7d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The state of a private link service connection. - */ -@Fluent -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * The private link service connection status. - */ - private ConnectionStatus status; - - /* - * The description for connection status. For example if connection is rejected it can indicate reason for - * rejection. - */ - private String description; - - /* - * A message indicating if changes on the service provider require any updates on the consumer. - */ - private ActionsRequired actionsRequired; - - /** - * Creates an instance of PrivateLinkServiceConnectionState class. - */ - public PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: The private link service connection status. - * - * @return the status value. - */ - public ConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: The private link service connection status. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The description for connection status. For example if connection is rejected it can - * indicate reason for rejection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description for connection status. For example if connection is rejected it can - * indicate reason for rejection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public ActionsRequired actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(ActionsRequired actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("actionsRequired", - this.actionsRequired == null ? null : this.actionsRequired.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = ConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired - = ActionsRequired.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java deleted file mode 100644 index 1db0e15f8845..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of the archive at the time the operation was called. - */ -public final class ProvisioningState extends ExpandableStringEnum { - /** - * Static value Creating for ProvisioningState. - */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for ProvisioningState. - */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for ProvisioningState. - */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for ProvisioningState. - */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ProvisioningState. - */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for ProvisioningState. - */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningState() { - } - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** - * Gets known ProvisioningState values. - * - * @return known ProvisioningState values. - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java deleted file mode 100644 index 6d2303859cfb..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether or not public network access is allowed for the container registry. - */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java deleted file mode 100644 index 19f37023f9b3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The quarantine policy for a container registry. - */ -@Fluent -public final class QuarantinePolicy implements JsonSerializable { - /* - * The value that indicates whether the policy is enabled or not. - */ - private PolicyStatus status; - - /** - * Creates an instance of QuarantinePolicy class. - */ - public QuarantinePolicy() { - } - - /** - * Get the status property: The value that indicates whether the policy is enabled or not. - * - * @return the status value. - */ - public PolicyStatus status() { - return this.status; - } - - /** - * Set the status property: The value that indicates whether the policy is enabled or not. - * - * @param status the status value to set. - * @return the QuarantinePolicy object itself. - */ - public QuarantinePolicy withStatus(PolicyStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QuarantinePolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QuarantinePolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the QuarantinePolicy. - */ - public static QuarantinePolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QuarantinePolicy deserializedQuarantinePolicy = new QuarantinePolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedQuarantinePolicy.status = PolicyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedQuarantinePolicy; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java deleted file mode 100644 index e734076050fe..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The parameters used to regenerate the login credential. - */ -@Fluent -public final class RegenerateCredentialParameters implements JsonSerializable { - /* - * Specifies name of the password which should be regenerated -- password or password2. - */ - private PasswordName name; - - /** - * Creates an instance of RegenerateCredentialParameters class. - */ - public RegenerateCredentialParameters() { - } - - /** - * Get the name property: Specifies name of the password which should be regenerated -- password or password2. - * - * @return the name value. - */ - public PasswordName name() { - return this.name; - } - - /** - * Set the name property: Specifies name of the password which should be regenerated -- password or password2. - * - * @param name the name value to set. - * @return the RegenerateCredentialParameters object itself. - */ - public RegenerateCredentialParameters withName(PasswordName name) { - this.name = name; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegenerateCredentialParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegenerateCredentialParameters if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegenerateCredentialParameters. - */ - public static RegenerateCredentialParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegenerateCredentialParameters deserializedRegenerateCredentialParameters - = new RegenerateCredentialParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedRegenerateCredentialParameters.name = PasswordName.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegenerateCredentialParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java deleted file mode 100644 index a469b9b73938..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 Registries. - */ -public interface Registries { - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry. - */ - Registry getByResourceGroup(String resourceGroupName, String registryName); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 deleteByResourceGroup(String resourceGroupName, String registryName); - - /** - * Deletes a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 delete(String resourceGroupName, String registryName, Context context); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, Context context); - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry along with {@link Response}. - */ - Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context); - - /** - * Gets the quota usages for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 quota usages for the specified container registry. - */ - RegistryUsageListResult listUsages(String resourceGroupName, String registryName); - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 response from the ListCredentials operation along with {@link Response}. - */ - Response listCredentialsWithResponse(String resourceGroupName, String registryName, - Context context); - - /** - * Lists the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 response from the ListCredentials operation. - */ - RegistryListCredentialsResult listCredentials(String resourceGroupName, String registryName); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation along with {@link Response}. - */ - Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation. - */ - RegistryListCredentialsResult regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - GenerateCredentialsResult generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response}. - */ - Response checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, - Context context); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name. - */ - RegistryNameStatus checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry along with {@link Response}. - */ - Response getPrivateLinkResourceWithResponse(String resourceGroupName, String registryName, - String groupName, Context context); - - /** - * Gets a private link resource by a specified group name for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param groupName The name of the private link associated with the Azure 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 a private link resource by a specified group name for a container registry. - */ - PrivateLinkResource getPrivateLinkResource(String resourceGroupName, String registryName, String groupName); - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. - */ - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, - Context context); - - /** - * Gets the properties of the specified container registry. - * - * @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 properties of the specified container registry along with {@link Response}. - */ - Registry getById(String id); - - /** - * Gets the properties of the specified container registry. - * - * @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 properties of the specified container registry along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a container registry. - * - * @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); - - /** - * Deletes a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Registry resource. - * - * @param name resource name. - * @return the first stage of the new Registry definition. - */ - Registry.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java deleted file mode 100644 index d05aef22474c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java +++ /dev/null @@ -1,550 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner; -import java.util.Map; - -/** - * An immutable client-side representation of Registry. - */ -public interface Registry { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The properties of the container registry. - * - * @return the properties value. - */ - RegistryProperties properties(); - - /** - * Gets the sku property: The SKU of the container registry. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the identity property: The identity of the container registry. - * - * @return the identity value. - */ - IdentityProperties identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.containerregistry.generated.fluent.models.RegistryInner object. - * - * @return the inner object. - */ - RegistryInner innerModel(); - - /** - * The entirety of the Registry definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { - } - - /** - * The Registry definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Registry definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Registry 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. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the Registry definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithSku withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Registry definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The SKU of the container registry.. - * - * @param sku The SKU of the container registry. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the Registry 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.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - Registry create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Registry create(Context context); - } - - /** - * The stage of the Registry 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 Registry definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the container registry.. - * - * @param properties The properties of the container registry. - * @return the next definition stage. - */ - WithCreate withProperties(RegistryProperties properties); - } - - /** - * The stage of the Registry definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the container registry.. - * - * @param identity The identity of the container registry. - * @return the next definition stage. - */ - WithCreate withIdentity(IdentityProperties identity); - } - } - - /** - * Begins update for the Registry resource. - * - * @return the stage of resource update. - */ - Registry.Update update(); - - /** - * The template for Registry update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithAdminUserEnabled, UpdateStages.WithNetworkRuleSet, UpdateStages.WithPolicies, - UpdateStages.WithEncryption, UpdateStages.WithDataEndpointEnabled, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithNetworkRuleBypassOptions, UpdateStages.WithNetworkRuleBypassAllowedForTasks, - UpdateStages.WithAnonymousPullEnabled, UpdateStages.WithRoleAssignmentMode { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Registry apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Registry apply(Context context); - } - - /** - * The Registry update stages. - */ - interface UpdateStages { - /** - * The stage of the Registry update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags for the container registry.. - * - * @param tags The tags for the container registry. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Registry update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the container registry.. - * - * @param identity The identity of the container registry. - * @return the next definition stage. - */ - Update withIdentity(IdentityProperties identity); - } - - /** - * The stage of the Registry update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The SKU of the container registry.. - * - * @param sku The SKU of the container registry. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - - /** - * The stage of the Registry update allowing to specify adminUserEnabled. - */ - interface WithAdminUserEnabled { - /** - * Specifies the adminUserEnabled property: The value that indicates whether the admin user is enabled.. - * - * @param adminUserEnabled The value that indicates whether the admin user is enabled. - * @return the next definition stage. - */ - Update withAdminUserEnabled(Boolean adminUserEnabled); - } - - /** - * The stage of the Registry update allowing to specify networkRuleSet. - */ - interface WithNetworkRuleSet { - /** - * Specifies the networkRuleSet property: The network rule set for a container registry.. - * - * @param networkRuleSet The network rule set for a container registry. - * @return the next definition stage. - */ - Update withNetworkRuleSet(NetworkRuleSet networkRuleSet); - } - - /** - * The stage of the Registry update allowing to specify policies. - */ - interface WithPolicies { - /** - * Specifies the policies property: The policies for a container registry.. - * - * @param policies The policies for a container registry. - * @return the next definition stage. - */ - Update withPolicies(Policies policies); - } - - /** - * The stage of the Registry update allowing to specify encryption. - */ - interface WithEncryption { - /** - * Specifies the encryption property: The encryption settings of container registry.. - * - * @param encryption The encryption settings of container registry. - * @return the next definition stage. - */ - Update withEncryption(EncryptionProperty encryption); - } - - /** - * The stage of the Registry update allowing to specify dataEndpointEnabled. - */ - interface WithDataEndpointEnabled { - /** - * Specifies the dataEndpointEnabled property: Enable a single data endpoint per region for serving data.. - * - * @param dataEndpointEnabled Enable a single data endpoint per region for serving data. - * @return the next definition stage. - */ - Update withDataEndpointEnabled(Boolean dataEndpointEnabled); - } - - /** - * The stage of the Registry update allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for the - * container registry.. - * - * @param publicNetworkAccess Whether or not public network access is allowed for the container registry. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - - /** - * The stage of the Registry update allowing to specify networkRuleBypassOptions. - */ - interface WithNetworkRuleBypassOptions { - /** - * Specifies the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a - * network restricted registry.. - * - * @param networkRuleBypassOptions Whether to allow trusted Azure services to access a network restricted - * registry. - * @return the next definition stage. - */ - Update withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions); - } - - /** - * The stage of the Registry update allowing to specify networkRuleBypassAllowedForTasks. - */ - interface WithNetworkRuleBypassAllowedForTasks { - /** - * Specifies the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a - * network restricted registry.. - * - * @param networkRuleBypassAllowedForTasks Whether to allow ACR Tasks service to access a network restricted - * registry. - * @return the next definition stage. - */ - Update withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks); - } - - /** - * The stage of the Registry update allowing to specify anonymousPullEnabled. - */ - interface WithAnonymousPullEnabled { - /** - * Specifies the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients.. - * - * @param anonymousPullEnabled Enables registry-wide pull from unauthenticated clients. - * @return the next definition stage. - */ - Update withAnonymousPullEnabled(Boolean anonymousPullEnabled); - } - - /** - * The stage of the Registry update allowing to specify roleAssignmentMode. - */ - interface WithRoleAssignmentMode { - /** - * Specifies the roleAssignmentMode property: Determines registry role assignment mode.. - * - * @param roleAssignmentMode Determines registry role assignment mode. - * @return the next definition stage. - */ - Update withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Registry refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Registry refresh(Context context); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(ImportImageParameters parameters); - - /** - * Copies an image to this container registry from the specified container registry. - * - * @param parameters The parameters specifying the image to copy and the source container registry. - * @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 importImage(ImportImageParameters parameters, Context context); - - /** - * Lists the login credentials for the specified container registry. - * - * @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 response from the ListCredentials operation along with {@link Response}. - */ - Response listCredentialsWithResponse(Context context); - - /** - * Lists the login credentials for the specified container registry. - * - * @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 response from the ListCredentials operation. - */ - RegistryListCredentialsResult listCredentials(); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation along with {@link Response}. - */ - Response regenerateCredentialWithResponse( - RegenerateCredentialParameters regenerateCredentialParameters, Context context); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation. - */ - RegistryListCredentialsResult regenerateCredential(RegenerateCredentialParameters regenerateCredentialParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters); - - /** - * Generate keys for a token of a specified container registry. - * - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response. - */ - GenerateCredentialsResult generateCredentials(GenerateCredentialsParameters generateCredentialsParameters, - Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java deleted file mode 100644 index e8eb5bbf747c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner; -import java.util.List; - -/** - * An immutable client-side representation of RegistryListCredentialsResult. - */ -public interface RegistryListCredentialsResult { - /** - * Gets the username property: The username for a container registry. - * - * @return the username value. - */ - String username(); - - /** - * Gets the passwords property: The list of passwords for a container registry. - * - * @return the passwords value. - */ - List passwords(); - - /** - * Gets the inner - * com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner object. - * - * @return the inner object. - */ - RegistryListCredentialsResultInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java deleted file mode 100644 index 0d5f14131b5b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A request to check whether a container registry name is available. - */ -@Fluent -public final class RegistryNameCheckRequest implements JsonSerializable { - /* - * The name of the container registry. - */ - private String name; - - /* - * The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - */ - private ContainerRegistryResourceType type; - - /** - * Creates an instance of RegistryNameCheckRequest class. - */ - public RegistryNameCheckRequest() { - } - - /** - * Get the name property: The name of the container registry. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the container registry. - * - * @param name the name value to set. - * @return the RegistryNameCheckRequest object itself. - */ - public RegistryNameCheckRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type of the container registry. This field must be set to - * 'Microsoft.ContainerRegistry/registries'. - * - * @return the type value. - */ - public ContainerRegistryResourceType type() { - return this.type; - } - - /** - * Set the type property: The resource type of the container registry. This field must be set to - * 'Microsoft.ContainerRegistry/registries'. - * - * @param type the type value to set. - * @return the RegistryNameCheckRequest object itself. - */ - public RegistryNameCheckRequest withType(ContainerRegistryResourceType type) { - this.type = type; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryNameCheckRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryNameCheckRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegistryNameCheckRequest. - */ - public static RegistryNameCheckRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryNameCheckRequest deserializedRegistryNameCheckRequest = new RegistryNameCheckRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedRegistryNameCheckRequest.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRegistryNameCheckRequest.type - = ContainerRegistryResourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryNameCheckRequest; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java deleted file mode 100644 index 8cae32dda859..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; - -/** - * An immutable client-side representation of RegistryNameStatus. - */ -public interface RegistryNameStatus { - /** - * Gets the nameAvailable property: The value that indicates whether the name is available. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: If any, the reason that the name is not available. - * - * @return the reason value. - */ - String reason(); - - /** - * Gets the message property: If any, the error message that provides more detail for the reason that the name is - * not available. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner - * object. - * - * @return the inner object. - */ - RegistryNameStatusInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java deleted file mode 100644 index 59f9f54fb110..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The login password for the container registry. - */ -@Immutable -public final class RegistryPassword implements JsonSerializable { - /* - * The password name. - */ - private PasswordName name; - - /* - * The password value. - */ - private String value; - - /** - * Creates an instance of RegistryPassword class. - */ - private RegistryPassword() { - } - - /** - * Get the name property: The password name. - * - * @return the name value. - */ - public PasswordName name() { - return this.name; - } - - /** - * Get the value property: The password value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPassword from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPassword if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryPassword. - */ - public static RegistryPassword fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPassword deserializedRegistryPassword = new RegistryPassword(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedRegistryPassword.name = PasswordName.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedRegistryPassword.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPassword; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java deleted file mode 100644 index c30b8dad158d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java +++ /dev/null @@ -1,482 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * The properties of a container registry. - */ -@Fluent -public final class RegistryProperties implements JsonSerializable { - /* - * The URL that can be used to log into the container registry. - */ - private String loginServer; - - /* - * The creation date of the container registry in ISO8601 format. - */ - private OffsetDateTime creationDate; - - /* - * The provisioning state of the container registry at the time the operation was called. - */ - private ProvisioningState provisioningState; - - /* - * The status of the container registry at the time the operation was called. - */ - private Status status; - - /* - * The value that indicates whether the admin user is enabled. - */ - private Boolean adminUserEnabled; - - /* - * The network rule set for a container registry. - */ - private NetworkRuleSet networkRuleSet; - - /* - * The policies for a container registry. - */ - private Policies policies; - - /* - * The encryption settings of container registry. - */ - private EncryptionProperty encryption; - - /* - * Enable a single data endpoint per region for serving data. - */ - private Boolean dataEndpointEnabled; - - /* - * List of host names that will serve data when dataEndpointEnabled is true. - */ - private List dataEndpointHostNames; - - /* - * List of private endpoint connections for a container registry. - */ - private List privateEndpointConnections; - - /* - * Whether or not public network access is allowed for the container registry. - */ - private PublicNetworkAccess publicNetworkAccess; - - /* - * Whether to allow trusted Azure services to access a network restricted registry. - */ - private NetworkRuleBypassOptions networkRuleBypassOptions; - - /* - * Whether or not Tasks allowed to bypass the network rules for this container registry. - */ - private Boolean networkRuleBypassAllowedForTasks; - - /* - * Whether or not zone redundancy is enabled for this container registry - */ - private ZoneRedundancy zoneRedundancy; - - /* - * Enables registry-wide pull from unauthenticated clients. - */ - private Boolean anonymousPullEnabled; - - /* - * Determines registry role assignment mode. - */ - private RoleAssignmentMode roleAssignmentMode; - - /** - * Creates an instance of RegistryProperties class. - */ - public RegistryProperties() { - } - - /** - * Get the loginServer property: The URL that can be used to log into the container registry. - * - * @return the loginServer value. - */ - public String loginServer() { - return this.loginServer; - } - - /** - * Get the creationDate property: The creation date of the container registry in ISO8601 format. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: The provisioning state of the container registry at the time the operation - * was called. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the status property: The status of the container registry at the time the operation was called. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @return the adminUserEnabled value. - */ - public Boolean adminUserEnabled() { - return this.adminUserEnabled; - } - - /** - * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @param adminUserEnabled the adminUserEnabled value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withAdminUserEnabled(Boolean adminUserEnabled) { - this.adminUserEnabled = adminUserEnabled; - return this; - } - - /** - * Get the networkRuleSet property: The network rule set for a container registry. - * - * @return the networkRuleSet value. - */ - public NetworkRuleSet networkRuleSet() { - return this.networkRuleSet; - } - - /** - * Set the networkRuleSet property: The network rule set for a container registry. - * - * @param networkRuleSet the networkRuleSet value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withNetworkRuleSet(NetworkRuleSet networkRuleSet) { - this.networkRuleSet = networkRuleSet; - return this; - } - - /** - * Get the policies property: The policies for a container registry. - * - * @return the policies value. - */ - public Policies policies() { - return this.policies; - } - - /** - * Set the policies property: The policies for a container registry. - * - * @param policies the policies value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withPolicies(Policies policies) { - this.policies = policies; - return this; - } - - /** - * Get the encryption property: The encryption settings of container registry. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of container registry. - * - * @param encryption the encryption value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @return the dataEndpointEnabled value. - */ - public Boolean dataEndpointEnabled() { - return this.dataEndpointEnabled; - } - - /** - * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @param dataEndpointEnabled the dataEndpointEnabled value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withDataEndpointEnabled(Boolean dataEndpointEnabled) { - this.dataEndpointEnabled = dataEndpointEnabled; - return this; - } - - /** - * Get the dataEndpointHostNames property: List of host names that will serve data when dataEndpointEnabled is true. - * - * @return the dataEndpointHostNames value. - */ - public List dataEndpointHostNames() { - return this.dataEndpointHostNames; - } - - /** - * Get the privateEndpointConnections property: List of private endpoint connections for a container registry. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @return the networkRuleBypassOptions value. - */ - public NetworkRuleBypassOptions networkRuleBypassOptions() { - return this.networkRuleBypassOptions; - } - - /** - * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { - this.networkRuleBypassOptions = networkRuleBypassOptions; - return this; - } - - /** - * Get the networkRuleBypassAllowedForTasks property: Whether or not Tasks allowed to bypass the network rules for - * this container registry. - * - * @return the networkRuleBypassAllowedForTasks value. - */ - public Boolean networkRuleBypassAllowedForTasks() { - return this.networkRuleBypassAllowedForTasks; - } - - /** - * Set the networkRuleBypassAllowedForTasks property: Whether or not Tasks allowed to bypass the network rules for - * this container registry. - * - * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { - this.networkRuleBypassAllowedForTasks = networkRuleBypassAllowedForTasks; - return this; - } - - /** - * Get the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry. - * - * @return the zoneRedundancy value. - */ - public ZoneRedundancy zoneRedundancy() { - return this.zoneRedundancy; - } - - /** - * Set the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry. - * - * @param zoneRedundancy the zoneRedundancy value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withZoneRedundancy(ZoneRedundancy zoneRedundancy) { - this.zoneRedundancy = zoneRedundancy; - return this; - } - - /** - * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @return the anonymousPullEnabled value. - */ - public Boolean anonymousPullEnabled() { - return this.anonymousPullEnabled; - } - - /** - * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @param anonymousPullEnabled the anonymousPullEnabled value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withAnonymousPullEnabled(Boolean anonymousPullEnabled) { - this.anonymousPullEnabled = anonymousPullEnabled; - return this; - } - - /** - * Get the roleAssignmentMode property: Determines registry role assignment mode. - * - * @return the roleAssignmentMode value. - */ - public RoleAssignmentMode roleAssignmentMode() { - return this.roleAssignmentMode; - } - - /** - * Set the roleAssignmentMode property: Determines registry role assignment mode. - * - * @param roleAssignmentMode the roleAssignmentMode value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { - this.roleAssignmentMode = roleAssignmentMode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("adminUserEnabled", this.adminUserEnabled); - jsonWriter.writeJsonField("networkRuleSet", this.networkRuleSet); - jsonWriter.writeJsonField("policies", this.policies); - jsonWriter.writeJsonField("encryption", this.encryption); - jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeStringField("networkRuleBypassOptions", - this.networkRuleBypassOptions == null ? null : this.networkRuleBypassOptions.toString()); - jsonWriter.writeBooleanField("networkRuleBypassAllowedForTasks", this.networkRuleBypassAllowedForTasks); - jsonWriter.writeStringField("zoneRedundancy", - this.zoneRedundancy == null ? null : this.zoneRedundancy.toString()); - jsonWriter.writeBooleanField("anonymousPullEnabled", this.anonymousPullEnabled); - jsonWriter.writeStringField("roleAssignmentMode", - this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryProperties. - */ - public static RegistryProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryProperties deserializedRegistryProperties = new RegistryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loginServer".equals(fieldName)) { - deserializedRegistryProperties.loginServer = reader.getString(); - } else if ("creationDate".equals(fieldName)) { - deserializedRegistryProperties.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedRegistryProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedRegistryProperties.status = Status.fromJson(reader); - } else if ("adminUserEnabled".equals(fieldName)) { - deserializedRegistryProperties.adminUserEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("networkRuleSet".equals(fieldName)) { - deserializedRegistryProperties.networkRuleSet = NetworkRuleSet.fromJson(reader); - } else if ("policies".equals(fieldName)) { - deserializedRegistryProperties.policies = Policies.fromJson(reader); - } else if ("encryption".equals(fieldName)) { - deserializedRegistryProperties.encryption = EncryptionProperty.fromJson(reader); - } else if ("dataEndpointEnabled".equals(fieldName)) { - deserializedRegistryProperties.dataEndpointEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("dataEndpointHostNames".equals(fieldName)) { - List dataEndpointHostNames = reader.readArray(reader1 -> reader1.getString()); - deserializedRegistryProperties.dataEndpointHostNames = dataEndpointHostNames; - } else if ("privateEndpointConnections".equals(fieldName)) { - List privateEndpointConnections - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedRegistryProperties.privateEndpointConnections = privateEndpointConnections; - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedRegistryProperties.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("networkRuleBypassOptions".equals(fieldName)) { - deserializedRegistryProperties.networkRuleBypassOptions - = NetworkRuleBypassOptions.fromString(reader.getString()); - } else if ("networkRuleBypassAllowedForTasks".equals(fieldName)) { - deserializedRegistryProperties.networkRuleBypassAllowedForTasks - = reader.getNullable(JsonReader::getBoolean); - } else if ("zoneRedundancy".equals(fieldName)) { - deserializedRegistryProperties.zoneRedundancy = ZoneRedundancy.fromString(reader.getString()); - } else if ("anonymousPullEnabled".equals(fieldName)) { - deserializedRegistryProperties.anonymousPullEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("roleAssignmentMode".equals(fieldName)) { - deserializedRegistryProperties.roleAssignmentMode - = RoleAssignmentMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java deleted file mode 100644 index ea482c38ed85..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters; -import java.io.IOException; -import java.util.Map; - -/** - * The parameters for updating a container registry. - */ -@Fluent -public final class RegistryUpdateParameters implements JsonSerializable { - /* - * The identity of the container registry. - */ - private IdentityProperties identity; - - /* - * The tags for the container registry. - */ - private Map tags; - - /* - * The SKU of the container registry. - */ - private Sku sku; - - /* - * The properties that the container registry will be updated with. - */ - private RegistryPropertiesUpdateParameters innerProperties; - - /** - * Creates an instance of RegistryUpdateParameters class. - */ - public RegistryUpdateParameters() { - } - - /** - * Get the identity property: The identity of the container registry. - * - * @return the identity value. - */ - public IdentityProperties identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the container registry. - * - * @param identity the identity value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withIdentity(IdentityProperties identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: The tags for the container registry. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags for the container registry. - * - * @param tags the tags value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The SKU of the container registry. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The SKU of the container registry. - * - * @param sku the sku value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the innerProperties property: The properties that the container registry will be updated with. - * - * @return the innerProperties value. - */ - private RegistryPropertiesUpdateParameters innerProperties() { - return this.innerProperties; - } - - /** - * Get the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @return the adminUserEnabled value. - */ - public Boolean adminUserEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().adminUserEnabled(); - } - - /** - * Set the adminUserEnabled property: The value that indicates whether the admin user is enabled. - * - * @param adminUserEnabled the adminUserEnabled value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withAdminUserEnabled(adminUserEnabled); - return this; - } - - /** - * Get the networkRuleSet property: The network rule set for a container registry. - * - * @return the networkRuleSet value. - */ - public NetworkRuleSet networkRuleSet() { - return this.innerProperties() == null ? null : this.innerProperties().networkRuleSet(); - } - - /** - * Set the networkRuleSet property: The network rule set for a container registry. - * - * @param networkRuleSet the networkRuleSet value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withNetworkRuleSet(networkRuleSet); - return this; - } - - /** - * Get the policies property: The policies for a container registry. - * - * @return the policies value. - */ - public Policies policies() { - return this.innerProperties() == null ? null : this.innerProperties().policies(); - } - - /** - * Set the policies property: The policies for a container registry. - * - * @param policies the policies value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withPolicies(Policies policies) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withPolicies(policies); - return this; - } - - /** - * Get the encryption property: The encryption settings of container registry. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The encryption settings of container registry. - * - * @param encryption the encryption value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withEncryption(EncryptionProperty encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @return the dataEndpointEnabled value. - */ - public Boolean dataEndpointEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().dataEndpointEnabled(); - } - - /** - * Set the dataEndpointEnabled property: Enable a single data endpoint per region for serving data. - * - * @param dataEndpointEnabled the dataEndpointEnabled value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withDataEndpointEnabled(Boolean dataEndpointEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withDataEndpointEnabled(dataEndpointEnabled); - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @return the networkRuleBypassOptions value. - */ - public NetworkRuleBypassOptions networkRuleBypassOptions() { - return this.innerProperties() == null ? null : this.innerProperties().networkRuleBypassOptions(); - } - - /** - * Set the networkRuleBypassOptions property: Whether to allow trusted Azure services to access a network restricted - * registry. - * - * @param networkRuleBypassOptions the networkRuleBypassOptions value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withNetworkRuleBypassOptions(NetworkRuleBypassOptions networkRuleBypassOptions) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withNetworkRuleBypassOptions(networkRuleBypassOptions); - return this; - } - - /** - * Get the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network - * restricted registry. - * - * @return the networkRuleBypassAllowedForTasks value. - */ - public Boolean networkRuleBypassAllowedForTasks() { - return this.innerProperties() == null ? null : this.innerProperties().networkRuleBypassAllowedForTasks(); - } - - /** - * Set the networkRuleBypassAllowedForTasks property: Whether to allow ACR Tasks service to access a network - * restricted registry. - * - * @param networkRuleBypassAllowedForTasks the networkRuleBypassAllowedForTasks value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withNetworkRuleBypassAllowedForTasks(Boolean networkRuleBypassAllowedForTasks) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withNetworkRuleBypassAllowedForTasks(networkRuleBypassAllowedForTasks); - return this; - } - - /** - * Get the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @return the anonymousPullEnabled value. - */ - public Boolean anonymousPullEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().anonymousPullEnabled(); - } - - /** - * Set the anonymousPullEnabled property: Enables registry-wide pull from unauthenticated clients. - * - * @param anonymousPullEnabled the anonymousPullEnabled value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withAnonymousPullEnabled(Boolean anonymousPullEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withAnonymousPullEnabled(anonymousPullEnabled); - return this; - } - - /** - * Get the roleAssignmentMode property: Determines registry role assignment mode. - * - * @return the roleAssignmentMode value. - */ - public RoleAssignmentMode roleAssignmentMode() { - return this.innerProperties() == null ? null : this.innerProperties().roleAssignmentMode(); - } - - /** - * Set the roleAssignmentMode property: Determines registry role assignment mode. - * - * @param roleAssignmentMode the roleAssignmentMode value to set. - * @return the RegistryUpdateParameters object itself. - */ - public RegistryUpdateParameters withRoleAssignmentMode(RoleAssignmentMode roleAssignmentMode) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPropertiesUpdateParameters(); - } - this.innerProperties().withRoleAssignmentMode(roleAssignmentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryUpdateParameters if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryUpdateParameters. - */ - public static RegistryUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryUpdateParameters deserializedRegistryUpdateParameters = new RegistryUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedRegistryUpdateParameters.identity = IdentityProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRegistryUpdateParameters.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedRegistryUpdateParameters.sku = Sku.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedRegistryUpdateParameters.innerProperties - = RegistryPropertiesUpdateParameters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java deleted file mode 100644 index 651bcf390450..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The quota usage for a container registry. - */ -@Immutable -public final class RegistryUsage implements JsonSerializable { - /* - * The name of the usage. - */ - private String name; - - /* - * The limit of the usage. - */ - private Long limit; - - /* - * The current value of the usage. - */ - private Long currentValue; - - /* - * The unit of measurement. - */ - private RegistryUsageUnit unit; - - /** - * Creates an instance of RegistryUsage class. - */ - private RegistryUsage() { - } - - /** - * Get the name property: The name of the usage. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the limit property: The limit of the usage. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the currentValue property: The current value of the usage. - * - * @return the currentValue value. - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Get the unit property: The unit of measurement. - * - * @return the unit value. - */ - public RegistryUsageUnit unit() { - return this.unit; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeNumberField("limit", this.limit); - jsonWriter.writeNumberField("currentValue", this.currentValue); - jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryUsage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryUsage if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryUsage. - */ - public static RegistryUsage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryUsage deserializedRegistryUsage = new RegistryUsage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedRegistryUsage.name = reader.getString(); - } else if ("limit".equals(fieldName)) { - deserializedRegistryUsage.limit = reader.getNullable(JsonReader::getLong); - } else if ("currentValue".equals(fieldName)) { - deserializedRegistryUsage.currentValue = reader.getNullable(JsonReader::getLong); - } else if ("unit".equals(fieldName)) { - deserializedRegistryUsage.unit = RegistryUsageUnit.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryUsage; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java deleted file mode 100644 index 5b825ce91eb5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import java.util.List; - -/** - * An immutable client-side representation of RegistryUsageListResult. - */ -public interface RegistryUsageListResult { - /** - * Gets the value property: The list of container registry quota usages. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner - * object. - * - * @return the inner object. - */ - RegistryUsageListResultInner innerModel(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java deleted file mode 100644 index 29ce8ba3a4bf..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The unit of measurement. - */ -public final class RegistryUsageUnit extends ExpandableStringEnum { - /** - * Static value Count for RegistryUsageUnit. - */ - public static final RegistryUsageUnit COUNT = fromString("Count"); - - /** - * Static value Bytes for RegistryUsageUnit. - */ - public static final RegistryUsageUnit BYTES = fromString("Bytes"); - - /** - * Creates a new instance of RegistryUsageUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RegistryUsageUnit() { - } - - /** - * Creates or finds a RegistryUsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegistryUsageUnit. - */ - public static RegistryUsageUnit fromString(String name) { - return fromString(name, RegistryUsageUnit.class); - } - - /** - * Gets known RegistryUsageUnit values. - * - * @return known RegistryUsageUnit values. - */ - public static Collection values() { - return values(RegistryUsageUnit.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java deleted file mode 100644 index 931c134dd55f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import java.util.Map; - -/** - * An immutable client-side representation of Replication. - */ -public interface Replication { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The properties of the replication. - * - * @return the properties value. - */ - ReplicationProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.containerregistry.generated.fluent.models.ReplicationInner object. - * - * @return the inner object. - */ - ReplicationInner innerModel(); - - /** - * The entirety of the Replication definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Replication definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Replication definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Replication 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 Replication definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the Replication 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Replication create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Replication create(Context context); - } - - /** - * The stage of the Replication 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 Replication definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the replication.. - * - * @param properties The properties of the replication. - * @return the next definition stage. - */ - WithCreate withProperties(ReplicationProperties properties); - } - } - - /** - * Begins update for the Replication resource. - * - * @return the stage of resource update. - */ - Replication.Update update(); - - /** - * The template for Replication update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithRegionEndpointEnabled { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Replication apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Replication apply(Context context); - } - - /** - * The Replication update stages. - */ - interface UpdateStages { - /** - * The stage of the Replication update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags for the replication.. - * - * @param tags The tags for the replication. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Replication update allowing to specify regionEndpointEnabled. - */ - interface WithRegionEndpointEnabled { - /** - * Specifies the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is - * enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its - * data will continue to be synced with other replications.. - * - * @param regionEndpointEnabled Specifies whether the replication's regional endpoint is enabled. Requests - * will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * @return the next definition stage. - */ - Update withRegionEndpointEnabled(Boolean regionEndpointEnabled); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Replication refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Replication refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java deleted file mode 100644 index 7827aba8a6da..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of a replication. - */ -@Fluent -public final class ReplicationProperties implements JsonSerializable { - /* - * The provisioning state of the replication at the time the operation was called. - */ - private ProvisioningState provisioningState; - - /* - * The status of the replication at the time the operation was called. - */ - private Status status; - - /* - * Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication - * whose regional endpoint is disabled, however its data will continue to be synced with other replications. - */ - private Boolean regionEndpointEnabled; - - /* - * Whether or not zone redundancy is enabled for this container registry replication - */ - private ZoneRedundancy zoneRedundancy; - - /** - * Creates an instance of ReplicationProperties class. - */ - public ReplicationProperties() { - } - - /** - * Get the provisioningState property: The provisioning state of the replication at the time the operation was - * called. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the status property: The status of the replication at the time the operation was called. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @return the regionEndpointEnabled value. - */ - public Boolean regionEndpointEnabled() { - return this.regionEndpointEnabled; - } - - /** - * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @param regionEndpointEnabled the regionEndpointEnabled value to set. - * @return the ReplicationProperties object itself. - */ - public ReplicationProperties withRegionEndpointEnabled(Boolean regionEndpointEnabled) { - this.regionEndpointEnabled = regionEndpointEnabled; - return this; - } - - /** - * Get the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry - * replication. - * - * @return the zoneRedundancy value. - */ - public ZoneRedundancy zoneRedundancy() { - return this.zoneRedundancy; - } - - /** - * Set the zoneRedundancy property: Whether or not zone redundancy is enabled for this container registry - * replication. - * - * @param zoneRedundancy the zoneRedundancy value to set. - * @return the ReplicationProperties object itself. - */ - public ReplicationProperties withZoneRedundancy(ZoneRedundancy zoneRedundancy) { - this.zoneRedundancy = zoneRedundancy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("regionEndpointEnabled", this.regionEndpointEnabled); - jsonWriter.writeStringField("zoneRedundancy", - this.zoneRedundancy == null ? null : this.zoneRedundancy.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProperties. - */ - public static ReplicationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProperties deserializedReplicationProperties = new ReplicationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedReplicationProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedReplicationProperties.status = Status.fromJson(reader); - } else if ("regionEndpointEnabled".equals(fieldName)) { - deserializedReplicationProperties.regionEndpointEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("zoneRedundancy".equals(fieldName)) { - deserializedReplicationProperties.zoneRedundancy = ZoneRedundancy.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java deleted file mode 100644 index 8610396ca592..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties; -import java.io.IOException; -import java.util.Map; - -/** - * The parameters for updating a replication. - */ -@Fluent -public final class ReplicationUpdateParameters implements JsonSerializable { - /* - * The tags for the replication. - */ - private Map tags; - - /* - * The parameters for updating a replication's properties - */ - private ReplicationUpdateParametersProperties innerProperties; - - /** - * Creates an instance of ReplicationUpdateParameters class. - */ - public ReplicationUpdateParameters() { - } - - /** - * Get the tags property: The tags for the replication. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags for the replication. - * - * @param tags the tags value to set. - * @return the ReplicationUpdateParameters object itself. - */ - public ReplicationUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: The parameters for updating a replication's properties. - * - * @return the innerProperties value. - */ - private ReplicationUpdateParametersProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @return the regionEndpointEnabled value. - */ - public Boolean regionEndpointEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().regionEndpointEnabled(); - } - - /** - * Set the regionEndpointEnabled property: Specifies whether the replication's regional endpoint is enabled. - * Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue - * to be synced with other replications. - * - * @param regionEndpointEnabled the regionEndpointEnabled value to set. - * @return the ReplicationUpdateParameters object itself. - */ - public ReplicationUpdateParameters withRegionEndpointEnabled(Boolean regionEndpointEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicationUpdateParametersProperties(); - } - this.innerProperties().withRegionEndpointEnabled(regionEndpointEnabled); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationUpdateParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationUpdateParameters. - */ - public static ReplicationUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationUpdateParameters deserializedReplicationUpdateParameters = new ReplicationUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedReplicationUpdateParameters.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedReplicationUpdateParameters.innerProperties - = ReplicationUpdateParametersProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java deleted file mode 100644 index 504eb358f426..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 Replications. - */ -public interface Replications { - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String replicationName, - Context context); - - /** - * Gets the properties of the specified replication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 properties of the specified replication. - */ - Replication get(String resourceGroupName, String registryName, String replicationName); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 registryName, String replicationName); - - /** - * Deletes a replication from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param replicationName The name of the replication. - * @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 delete(String resourceGroupName, String registryName, String replicationName, Context context); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified replication. - * - * @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 properties of the specified replication along with {@link Response}. - */ - Replication getById(String id); - - /** - * Gets the properties of the specified replication. - * - * @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 properties of the specified replication along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a replication from a container registry. - * - * @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); - - /** - * Deletes a replication from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Replication resource. - * - * @param name resource name. - * @return the first stage of the new Replication definition. - */ - Replication.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java deleted file mode 100644 index 47f8b108c3aa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The request that generated the event. - */ -@Immutable -public final class Request implements JsonSerializable { - /* - * The ID of the request that initiated the event. - */ - private String id; - - /* - * The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr - * from the standard http request. - */ - private String addr; - - /* - * The externally accessible hostname of the registry instance, as specified by the http host header on incoming - * requests. - */ - private String host; - - /* - * The request method that generated the event. - */ - private String method; - - /* - * The user agent header of the request. - */ - private String useragent; - - /** - * Creates an instance of Request class. - */ - private Request() { - } - - /** - * Get the id property: The ID of the request that initiated the event. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event. - * This is the RemoteAddr from the standard http request. - * - * @return the addr value. - */ - public String addr() { - return this.addr; - } - - /** - * Get the host property: The externally accessible hostname of the registry instance, as specified by the http host - * header on incoming requests. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Get the method property: The request method that generated the event. - * - * @return the method value. - */ - public String method() { - return this.method; - } - - /** - * Get the useragent property: The user agent header of the request. - * - * @return the useragent value. - */ - public String useragent() { - return this.useragent; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("addr", this.addr); - jsonWriter.writeStringField("host", this.host); - jsonWriter.writeStringField("method", this.method); - jsonWriter.writeStringField("useragent", this.useragent); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Request from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Request if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Request. - */ - public static Request fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Request deserializedRequest = new Request(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRequest.id = reader.getString(); - } else if ("addr".equals(fieldName)) { - deserializedRequest.addr = reader.getString(); - } else if ("host".equals(fieldName)) { - deserializedRequest.host = reader.getString(); - } else if ("method".equals(fieldName)) { - deserializedRequest.method = reader.getString(); - } else if ("useragent".equals(fieldName)) { - deserializedRequest.useragent = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRequest; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java deleted file mode 100644 index 908bc142bf88..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -/** - * The identity type. - */ -public enum ResourceIdentityType { - /** - * Enum value SystemAssigned. - */ - SYSTEM_ASSIGNED("SystemAssigned"), - - /** - * Enum value UserAssigned. - */ - USER_ASSIGNED("UserAssigned"), - - /** - * Enum value SystemAssigned, UserAssigned. - */ - SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), - - /** - * Enum value None. - */ - NONE("None"); - - /** - * The actual serialized value for a ResourceIdentityType instance. - */ - private final String value; - - ResourceIdentityType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ResourceIdentityType instance. - * - * @param value the serialized value to parse. - * @return the parsed ResourceIdentityType object, or null if unable to parse. - */ - public static ResourceIdentityType fromString(String value) { - if (value == null) { - return null; - } - ResourceIdentityType[] items = ResourceIdentityType.values(); - for (ResourceIdentityType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java deleted file mode 100644 index eb353c25902b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The retention policy for a container registry. - */ -@Fluent -public final class RetentionPolicy implements JsonSerializable { - /* - * The number of days to retain an untagged manifest after which it gets purged. - */ - private Integer days; - - /* - * The timestamp when the policy was last updated. - */ - private OffsetDateTime lastUpdatedTime; - - /* - * The value that indicates whether the policy is enabled or not. - */ - private PolicyStatus status; - - /** - * Creates an instance of RetentionPolicy class. - */ - public RetentionPolicy() { - } - - /** - * Get the days property: The number of days to retain an untagged manifest after which it gets purged. - * - * @return the days value. - */ - public Integer days() { - return this.days; - } - - /** - * Set the days property: The number of days to retain an untagged manifest after which it gets purged. - * - * @param days the days value to set. - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy withDays(Integer days) { - this.days = days; - return this; - } - - /** - * Get the lastUpdatedTime property: The timestamp when the policy was last updated. - * - * @return the lastUpdatedTime value. - */ - public OffsetDateTime lastUpdatedTime() { - return this.lastUpdatedTime; - } - - /** - * Get the status property: The value that indicates whether the policy is enabled or not. - * - * @return the status value. - */ - public PolicyStatus status() { - return this.status; - } - - /** - * Set the status property: The value that indicates whether the policy is enabled or not. - * - * @param status the status value to set. - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy withStatus(PolicyStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("days", this.days); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RetentionPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RetentionPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RetentionPolicy. - */ - public static RetentionPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RetentionPolicy deserializedRetentionPolicy = new RetentionPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("days".equals(fieldName)) { - deserializedRetentionPolicy.days = reader.getNullable(JsonReader::getInt); - } else if ("lastUpdatedTime".equals(fieldName)) { - deserializedRetentionPolicy.lastUpdatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedRetentionPolicy.status = PolicyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRetentionPolicy; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java deleted file mode 100644 index c73f2c7cd7a6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines registry role assignment mode. - */ -public final class RoleAssignmentMode extends ExpandableStringEnum { - /** - * Static value AbacRepositoryPermissions for RoleAssignmentMode. - */ - public static final RoleAssignmentMode ABAC_REPOSITORY_PERMISSIONS = fromString("AbacRepositoryPermissions"); - - /** - * Static value LegacyRegistryPermissions for RoleAssignmentMode. - */ - public static final RoleAssignmentMode LEGACY_REGISTRY_PERMISSIONS = fromString("LegacyRegistryPermissions"); - - /** - * Creates a new instance of RoleAssignmentMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RoleAssignmentMode() { - } - - /** - * Creates or finds a RoleAssignmentMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding RoleAssignmentMode. - */ - public static RoleAssignmentMode fromString(String name) { - return fromString(name, RoleAssignmentMode.class); - } - - /** - * Gets known RoleAssignmentMode values. - * - * @return known RoleAssignmentMode values. - */ - public static Collection values() { - return values(RoleAssignmentMode.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java deleted file mode 100644 index 2d72a884f772..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import java.util.List; - -/** - * An immutable client-side representation of ScopeMap. - */ -public interface ScopeMap { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of the scope map. - * - * @return the properties value. - */ - ScopeMapProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner object. - * - * @return the inner object. - */ - ScopeMapInner innerModel(); - - /** - * The entirety of the ScopeMap definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ScopeMap definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ScopeMap definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ScopeMap definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the ScopeMap 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ScopeMap create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ScopeMap create(Context context); - } - - /** - * The stage of the ScopeMap definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the scope map.. - * - * @param properties The properties of the scope map. - * @return the next definition stage. - */ - WithCreate withProperties(ScopeMapProperties properties); - } - } - - /** - * Begins update for the ScopeMap resource. - * - * @return the stage of resource update. - */ - ScopeMap.Update update(); - - /** - * The template for ScopeMap update. - */ - interface Update extends UpdateStages.WithDescription, UpdateStages.WithActions { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ScopeMap apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ScopeMap apply(Context context); - } - - /** - * The ScopeMap update stages. - */ - interface UpdateStages { - /** - * The stage of the ScopeMap update allowing to specify description. - */ - interface WithDescription { - /** - * Specifies the description property: The user friendly description of the scope map.. - * - * @param description The user friendly description of the scope map. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** - * The stage of the ScopeMap update allowing to specify actions. - */ - interface WithActions { - /** - * Specifies the actions property: The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * - * @param actions The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * @return the next definition stage. - */ - Update withActions(List actions); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ScopeMap refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ScopeMap refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java deleted file mode 100644 index a082ec32b72b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * The properties of a scope map. - */ -@Fluent -public final class ScopeMapProperties implements JsonSerializable { - /* - * The user friendly description of the scope map. - */ - private String description; - - /* - * The type of the scope map. E.g. BuildIn scope map. - */ - private String type; - - /* - * The creation date of scope map. - */ - private OffsetDateTime creationDate; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * The list of scoped permissions for registry artifacts. - * E.g. repositories/repository-name/content/read, - * repositories/repository-name/metadata/write - */ - private List actions; - - /** - * Creates an instance of ScopeMapProperties class. - */ - public ScopeMapProperties() { - } - - /** - * Get the description property: The user friendly description of the scope map. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The user friendly description of the scope map. - * - * @param description the description value to set. - * @return the ScopeMapProperties object itself. - */ - public ScopeMapProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type property: The type of the scope map. E.g. BuildIn scope map. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the creationDate property: The creation date of scope map. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the actions property: The list of scoped permissions for registry artifacts. - * E.g. repositories/repository-name/content/read, - * repositories/repository-name/metadata/write. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: The list of scoped permissions for registry artifacts. - * E.g. repositories/repository-name/content/read, - * repositories/repository-name/metadata/write. - * - * @param actions the actions value to set. - * @return the ScopeMapProperties object itself. - */ - public ScopeMapProperties withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScopeMapProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScopeMapProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScopeMapProperties. - */ - public static ScopeMapProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScopeMapProperties deserializedScopeMapProperties = new ScopeMapProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actions".equals(fieldName)) { - List actions = reader.readArray(reader1 -> reader1.getString()); - deserializedScopeMapProperties.actions = actions; - } else if ("description".equals(fieldName)) { - deserializedScopeMapProperties.description = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScopeMapProperties.type = reader.getString(); - } else if ("creationDate".equals(fieldName)) { - deserializedScopeMapProperties.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedScopeMapProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScopeMapProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java deleted file mode 100644 index a6ef5f213eee..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters; -import java.io.IOException; -import java.util.List; - -/** - * The properties for updating the scope map. - */ -@Fluent -public final class ScopeMapUpdateParameters implements JsonSerializable { - /* - * The update parameters for scope map properties. - */ - private ScopeMapPropertiesUpdateParameters innerProperties; - - /** - * Creates an instance of ScopeMapUpdateParameters class. - */ - public ScopeMapUpdateParameters() { - } - - /** - * Get the innerProperties property: The update parameters for scope map properties. - * - * @return the innerProperties value. - */ - private ScopeMapPropertiesUpdateParameters innerProperties() { - return this.innerProperties; - } - - /** - * Get the description property: The user friendly description of the scope map. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The user friendly description of the scope map. - * - * @param description the description value to set. - * @return the ScopeMapUpdateParameters object itself. - */ - public ScopeMapUpdateParameters withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ScopeMapPropertiesUpdateParameters(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the actions property: The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * - * @return the actions value. - */ - public List actions() { - return this.innerProperties() == null ? null : this.innerProperties().actions(); - } - - /** - * Set the actions property: The list of scope permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete. - * - * @param actions the actions value to set. - * @return the ScopeMapUpdateParameters object itself. - */ - public ScopeMapUpdateParameters withActions(List actions) { - if (this.innerProperties() == null) { - this.innerProperties = new ScopeMapPropertiesUpdateParameters(); - } - this.innerProperties().withActions(actions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScopeMapUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScopeMapUpdateParameters if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScopeMapUpdateParameters. - */ - public static ScopeMapUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScopeMapUpdateParameters deserializedScopeMapUpdateParameters = new ScopeMapUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedScopeMapUpdateParameters.innerProperties - = ScopeMapPropertiesUpdateParameters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScopeMapUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java deleted file mode 100644 index ed562e02e63b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 ScopeMaps. - */ -public interface ScopeMaps { - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String scopeMapName, - Context context); - - /** - * Gets the properties of the specified scope map. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 properties of the specified scope map. - */ - ScopeMap get(String resourceGroupName, String registryName, String scopeMapName); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 registryName, String scopeMapName); - - /** - * Deletes a scope map from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param scopeMapName The name of the scope map. - * @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 delete(String resourceGroupName, String registryName, String scopeMapName, Context context); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified scope map. - * - * @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 properties of the specified scope map along with {@link Response}. - */ - ScopeMap getById(String id); - - /** - * Gets the properties of the specified scope map. - * - * @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 properties of the specified scope map along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a scope map from a container registry. - * - * @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); - - /** - * Deletes a scope map from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ScopeMap resource. - * - * @param name resource name. - * @return the first stage of the new ScopeMap definition. - */ - ScopeMap.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java deleted file mode 100644 index 2f0cc3214414..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SKU of a container registry. - */ -@Fluent -public final class Sku implements JsonSerializable { - /* - * The SKU name of the container registry. Required for registry creation. - */ - private SkuName name; - - /* - * The SKU tier based on the SKU name. - */ - private SkuTier tier; - - /** - * Creates an instance of Sku class. - */ - public Sku() { - } - - /** - * Get the name property: The SKU name of the container registry. Required for registry creation. - * - * @return the name value. - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name property: The SKU name of the container registry. Required for registry creation. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier property: The SKU tier based on the SKU name. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Sku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Sku if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Sku. - */ - public static Sku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Sku deserializedSku = new Sku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSku.name = SkuName.fromString(reader.getString()); - } else if ("tier".equals(fieldName)) { - deserializedSku.tier = SkuTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSku; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java deleted file mode 100644 index 974b60b7df01..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The SKU name of the container registry. Required for registry creation. - */ -public final class SkuName extends ExpandableStringEnum { - /** - * Static value Classic for SkuName. - */ - public static final SkuName CLASSIC = fromString("Classic"); - - /** - * Static value Basic for SkuName. - */ - public static final SkuName BASIC = fromString("Basic"); - - /** - * Static value Standard for SkuName. - */ - public static final SkuName STANDARD = fromString("Standard"); - - /** - * Static value Premium for SkuName. - */ - public static final SkuName PREMIUM = fromString("Premium"); - - /** - * Creates a new instance of SkuName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SkuName() { - } - - /** - * Creates or finds a SkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuName. - */ - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** - * Gets known SkuName values. - * - * @return known SkuName values. - */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java deleted file mode 100644 index ab5582c09e00..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The SKU tier based on the SKU name. - */ -public final class SkuTier extends ExpandableStringEnum { - /** - * Static value Classic for SkuTier. - */ - public static final SkuTier CLASSIC = fromString("Classic"); - - /** - * Static value Basic for SkuTier. - */ - public static final SkuTier BASIC = fromString("Basic"); - - /** - * Static value Standard for SkuTier. - */ - public static final SkuTier STANDARD = fromString("Standard"); - - /** - * Static value Premium for SkuTier. - */ - public static final SkuTier PREMIUM = fromString("Premium"); - - /** - * Creates a new instance of SkuTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SkuTier() { - } - - /** - * Creates or finds a SkuTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuTier. - */ - public static SkuTier fromString(String name) { - return fromString(name, SkuTier.class); - } - - /** - * Gets known SkuTier values. - * - * @return known SkuTier values. - */ - public static Collection values() { - return values(SkuTier.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java deleted file mode 100644 index fcb9e666c186..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The registry node that generated the event. Put differently, while the actor initiates the event, the source - * generates it. - */ -@Immutable -public final class Source implements JsonSerializable { - /* - * The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved - * by os.Hostname() along with the running port. - */ - private String addr; - - /* - * The running instance of an application. Changes after each restart. - */ - private String instanceID; - - /** - * Creates an instance of Source class. - */ - private Source() { - } - - /** - * Get the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, - * this will be resolved by os.Hostname() along with the running port. - * - * @return the addr value. - */ - public String addr() { - return this.addr; - } - - /** - * Get the instanceID property: The running instance of an application. Changes after each restart. - * - * @return the instanceID value. - */ - public String instanceID() { - return this.instanceID; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("addr", this.addr); - jsonWriter.writeStringField("instanceID", this.instanceID); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Source from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Source if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Source. - */ - public static Source fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Source deserializedSource = new Source(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("addr".equals(fieldName)) { - deserializedSource.addr = reader.getString(); - } else if ("instanceID".equals(fieldName)) { - deserializedSource.instanceID = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSource; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java deleted file mode 100644 index 0c8bf5c59f03..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The status of an Azure resource at the time the operation was called. - */ -@Immutable -public final class Status implements JsonSerializable { - /* - * The short label for the status. - */ - private String displayStatus; - - /* - * The detailed message for the status, including alerts and error messages. - */ - private String message; - - /* - * The timestamp when the status was changed to the current value. - */ - private OffsetDateTime timestamp; - - /** - * Creates an instance of Status class. - */ - private Status() { - } - - /** - * Get the displayStatus property: The short label for the status. - * - * @return the displayStatus value. - */ - public String displayStatus() { - return this.displayStatus; - } - - /** - * Get the message property: The detailed message for the status, including alerts and error messages. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the timestamp property: The timestamp when the status was changed to the current value. - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Status from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Status if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Status. - */ - public static Status fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Status deserializedStatus = new Status(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("displayStatus".equals(fieldName)) { - deserializedStatus.displayStatus = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedStatus.message = reader.getString(); - } else if ("timestamp".equals(fieldName)) { - deserializedStatus.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedStatus; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java deleted file mode 100644 index 102b2a4302ae..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The status detail properties of the connected registry. - */ -@Immutable -public final class StatusDetailProperties implements JsonSerializable { - /* - * The component of the connected registry corresponding to the status. - */ - private String type; - - /* - * The HTTP status code. - */ - private String code; - - /* - * The description of the status. - */ - private String description; - - /* - * The timestamp of the status. - */ - private OffsetDateTime timestamp; - - /* - * The correlation ID of the status. - */ - private String correlationId; - - /** - * Creates an instance of StatusDetailProperties class. - */ - private StatusDetailProperties() { - } - - /** - * Get the type property: The component of the connected registry corresponding to the status. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the code property: The HTTP status code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the description property: The description of the status. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the timestamp property: The timestamp of the status. - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the correlationId property: The correlation ID of the status. - * - * @return the correlationId value. - */ - public String correlationId() { - return this.correlationId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StatusDetailProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StatusDetailProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the StatusDetailProperties. - */ - public static StatusDetailProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StatusDetailProperties deserializedStatusDetailProperties = new StatusDetailProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedStatusDetailProperties.type = reader.getString(); - } else if ("code".equals(fieldName)) { - deserializedStatusDetailProperties.code = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedStatusDetailProperties.description = reader.getString(); - } else if ("timestamp".equals(fieldName)) { - deserializedStatusDetailProperties.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("correlationId".equals(fieldName)) { - deserializedStatusDetailProperties.correlationId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStatusDetailProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java deleted file mode 100644 index 62e806b3d76e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; -import java.time.OffsetDateTime; - -/** - * The sync properties of the connected registry with its parent. - */ -@Fluent -public final class SyncProperties implements JsonSerializable { - /* - * The resource ID of the ACR token used to authenticate the connected registry to its parent during sync. - */ - private String tokenId; - - /* - * The cron expression indicating the schedule that the connected registry will sync with its parent. - */ - private String schedule; - - /* - * The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format - * P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - */ - private Duration syncWindow; - - /* - * The period of time for which a message is available to sync before it is expired. Specify the duration using the - * format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - */ - private Duration messageTtl; - - /* - * The last time a sync occurred between the connected registry and its parent. - */ - private OffsetDateTime lastSyncTime; - - /* - * The gateway endpoint used by the connected registry to communicate with its parent. - */ - private String gatewayEndpoint; - - /** - * Creates an instance of SyncProperties class. - */ - public SyncProperties() { - } - - /** - * Get the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its - * parent during sync. - * - * @return the tokenId value. - */ - public String tokenId() { - return this.tokenId; - } - - /** - * Set the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its - * parent during sync. - * - * @param tokenId the tokenId value to set. - * @return the SyncProperties object itself. - */ - public SyncProperties withTokenId(String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with - * its parent. - * - * @return the schedule value. - */ - public String schedule() { - return this.schedule; - } - - /** - * Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with - * its parent. - * - * @param schedule the schedule value to set. - * @return the SyncProperties object itself. - */ - public SyncProperties withSchedule(String schedule) { - this.schedule = schedule; - return this; - } - - /** - * Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify - * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @return the syncWindow value. - */ - public Duration syncWindow() { - return this.syncWindow; - } - - /** - * Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify - * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @param syncWindow the syncWindow value to set. - * @return the SyncProperties object itself. - */ - public SyncProperties withSyncWindow(Duration syncWindow) { - this.syncWindow = syncWindow; - return this; - } - - /** - * Get the messageTtl property: The period of time for which a message is available to sync before it is expired. - * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @return the messageTtl value. - */ - public Duration messageTtl() { - return this.messageTtl; - } - - /** - * Set the messageTtl property: The period of time for which a message is available to sync before it is expired. - * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @param messageTtl the messageTtl value to set. - * @return the SyncProperties object itself. - */ - public SyncProperties withMessageTtl(Duration messageTtl) { - this.messageTtl = messageTtl; - return this; - } - - /** - * Get the lastSyncTime property: The last time a sync occurred between the connected registry and its parent. - * - * @return the lastSyncTime value. - */ - public OffsetDateTime lastSyncTime() { - return this.lastSyncTime; - } - - /** - * Get the gatewayEndpoint property: The gateway endpoint used by the connected registry to communicate with its - * parent. - * - * @return the gatewayEndpoint value. - */ - public String gatewayEndpoint() { - return this.gatewayEndpoint; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tokenId", this.tokenId); - jsonWriter.writeStringField("messageTtl", CoreUtils.durationToStringWithDays(this.messageTtl)); - jsonWriter.writeStringField("schedule", this.schedule); - jsonWriter.writeStringField("syncWindow", CoreUtils.durationToStringWithDays(this.syncWindow)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SyncProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SyncProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SyncProperties. - */ - public static SyncProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SyncProperties deserializedSyncProperties = new SyncProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tokenId".equals(fieldName)) { - deserializedSyncProperties.tokenId = reader.getString(); - } else if ("messageTtl".equals(fieldName)) { - deserializedSyncProperties.messageTtl - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("schedule".equals(fieldName)) { - deserializedSyncProperties.schedule = reader.getString(); - } else if ("syncWindow".equals(fieldName)) { - deserializedSyncProperties.syncWindow - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("lastSyncTime".equals(fieldName)) { - deserializedSyncProperties.lastSyncTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("gatewayEndpoint".equals(fieldName)) { - deserializedSyncProperties.gatewayEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSyncProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java deleted file mode 100644 index e50b81109c1a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * The parameters for updating the sync properties of the connected registry with its parent. - */ -@Fluent -public final class SyncUpdateProperties implements JsonSerializable { - /* - * The cron expression indicating the schedule that the connected registry will sync with its parent. - */ - private String schedule; - - /* - * The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format - * P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - */ - private Duration syncWindow; - - /* - * The period of time for which a message is available to sync before it is expired. Specify the duration using the - * format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - */ - private Duration messageTtl; - - /** - * Creates an instance of SyncUpdateProperties class. - */ - public SyncUpdateProperties() { - } - - /** - * Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with - * its parent. - * - * @return the schedule value. - */ - public String schedule() { - return this.schedule; - } - - /** - * Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with - * its parent. - * - * @param schedule the schedule value to set. - * @return the SyncUpdateProperties object itself. - */ - public SyncUpdateProperties withSchedule(String schedule) { - this.schedule = schedule; - return this; - } - - /** - * Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify - * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @return the syncWindow value. - */ - public Duration syncWindow() { - return this.syncWindow; - } - - /** - * Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify - * the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @param syncWindow the syncWindow value to set. - * @return the SyncUpdateProperties object itself. - */ - public SyncUpdateProperties withSyncWindow(Duration syncWindow) { - this.syncWindow = syncWindow; - return this; - } - - /** - * Get the messageTtl property: The period of time for which a message is available to sync before it is expired. - * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @return the messageTtl value. - */ - public Duration messageTtl() { - return this.messageTtl; - } - - /** - * Set the messageTtl property: The period of time for which a message is available to sync before it is expired. - * Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - * - * @param messageTtl the messageTtl value to set. - * @return the SyncUpdateProperties object itself. - */ - public SyncUpdateProperties withMessageTtl(Duration messageTtl) { - this.messageTtl = messageTtl; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("schedule", this.schedule); - jsonWriter.writeStringField("syncWindow", CoreUtils.durationToStringWithDays(this.syncWindow)); - jsonWriter.writeStringField("messageTtl", CoreUtils.durationToStringWithDays(this.messageTtl)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SyncUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SyncUpdateProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SyncUpdateProperties. - */ - public static SyncUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SyncUpdateProperties deserializedSyncUpdateProperties = new SyncUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("schedule".equals(fieldName)) { - deserializedSyncUpdateProperties.schedule = reader.getString(); - } else if ("syncWindow".equals(fieldName)) { - deserializedSyncUpdateProperties.syncWindow - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("messageTtl".equals(fieldName)) { - deserializedSyncUpdateProperties.messageTtl - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedSyncUpdateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java deleted file mode 100644 index 221b931c4528..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The target of the event. - */ -@Immutable -public final class Target implements JsonSerializable { - /* - * The MIME type of the referenced object. - */ - private String mediaType; - - /* - * The number of bytes of the content. Same as Length field. - */ - private Long size; - - /* - * The digest of the content, as defined by the Registry V2 HTTP API Specification. - */ - private String digest; - - /* - * The number of bytes of the content. Same as Size field. - */ - private Long length; - - /* - * The repository name. - */ - private String repository; - - /* - * The direct URL to the content. - */ - private String url; - - /* - * The tag name. - */ - private String tag; - - /* - * The name of the artifact. - */ - private String name; - - /* - * The version of the artifact. - */ - private String version; - - /** - * Creates an instance of Target class. - */ - private Target() { - } - - /** - * Get the mediaType property: The MIME type of the referenced object. - * - * @return the mediaType value. - */ - public String mediaType() { - return this.mediaType; - } - - /** - * Get the size property: The number of bytes of the content. Same as Length field. - * - * @return the size value. - */ - public Long size() { - return this.size; - } - - /** - * Get the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. - * - * @return the digest value. - */ - public String digest() { - return this.digest; - } - - /** - * Get the length property: The number of bytes of the content. Same as Size field. - * - * @return the length value. - */ - public Long length() { - return this.length; - } - - /** - * Get the repository property: The repository name. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Get the url property: The direct URL to the content. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Get the tag property: The tag name. - * - * @return the tag value. - */ - public String tag() { - return this.tag; - } - - /** - * Get the name property: The name of the artifact. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the version property: The version of the artifact. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mediaType", this.mediaType); - jsonWriter.writeNumberField("size", this.size); - jsonWriter.writeStringField("digest", this.digest); - jsonWriter.writeNumberField("length", this.length); - jsonWriter.writeStringField("repository", this.repository); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeStringField("tag", this.tag); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Target from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Target if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Target. - */ - public static Target fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Target deserializedTarget = new Target(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mediaType".equals(fieldName)) { - deserializedTarget.mediaType = reader.getString(); - } else if ("size".equals(fieldName)) { - deserializedTarget.size = reader.getNullable(JsonReader::getLong); - } else if ("digest".equals(fieldName)) { - deserializedTarget.digest = reader.getString(); - } else if ("length".equals(fieldName)) { - deserializedTarget.length = reader.getNullable(JsonReader::getLong); - } else if ("repository".equals(fieldName)) { - deserializedTarget.repository = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedTarget.url = reader.getString(); - } else if ("tag".equals(fieldName)) { - deserializedTarget.tag = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedTarget.name = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedTarget.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTarget; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java deleted file mode 100644 index 25810fd5b69d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TLS certificate properties of the connected registry login server. - */ -@Immutable -public final class TlsCertificateProperties implements JsonSerializable { - /* - * The type of certificate location. - */ - private CertificateType type; - - /* - * Indicates the location of the certificates. - */ - private String location; - - /** - * Creates an instance of TlsCertificateProperties class. - */ - private TlsCertificateProperties() { - } - - /** - * Get the type property: The type of certificate location. - * - * @return the type value. - */ - public CertificateType type() { - return this.type; - } - - /** - * Get the location property: Indicates the location of the certificates. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TlsCertificateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TlsCertificateProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TlsCertificateProperties. - */ - public static TlsCertificateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TlsCertificateProperties deserializedTlsCertificateProperties = new TlsCertificateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedTlsCertificateProperties.type = CertificateType.fromString(reader.getString()); - } else if ("location".equals(fieldName)) { - deserializedTlsCertificateProperties.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTlsCertificateProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java deleted file mode 100644 index bfbce7571bf9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TLS properties of the connected registry login server. - */ -@Immutable -public final class TlsProperties implements JsonSerializable { - /* - * Indicates whether HTTPS is enabled for the login server. - */ - private TlsStatus status; - - /* - * The certificate used to configure HTTPS for the login server. - */ - private TlsCertificateProperties certificate; - - /** - * Creates an instance of TlsProperties class. - */ - private TlsProperties() { - } - - /** - * Get the status property: Indicates whether HTTPS is enabled for the login server. - * - * @return the status value. - */ - public TlsStatus status() { - return this.status; - } - - /** - * Get the certificate property: The certificate used to configure HTTPS for the login server. - * - * @return the certificate value. - */ - public TlsCertificateProperties certificate() { - return this.certificate; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TlsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TlsProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TlsProperties. - */ - public static TlsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TlsProperties deserializedTlsProperties = new TlsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedTlsProperties.status = TlsStatus.fromString(reader.getString()); - } else if ("certificate".equals(fieldName)) { - deserializedTlsProperties.certificate = TlsCertificateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTlsProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java deleted file mode 100644 index 52162086011f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether HTTPS is enabled for the login server. - */ -public final class TlsStatus extends ExpandableStringEnum { - /** - * Static value Enabled for TlsStatus. - */ - public static final TlsStatus ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for TlsStatus. - */ - public static final TlsStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of TlsStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TlsStatus() { - } - - /** - * Creates or finds a TlsStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding TlsStatus. - */ - public static TlsStatus fromString(String name) { - return fromString(name, TlsStatus.class); - } - - /** - * Gets known TlsStatus values. - * - * @return known TlsStatus values. - */ - public static Collection values() { - return values(TlsStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java deleted file mode 100644 index 18bffcc98b8d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner; - -/** - * An immutable client-side representation of Token. - */ -public interface Token { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties of the token. - * - * @return the properties value. - */ - TokenProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner object. - * - * @return the inner object. - */ - TokenInner innerModel(); - - /** - * The entirety of the Token definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Token definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Token definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Token definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the Token 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Token create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Token create(Context context); - } - - /** - * The stage of the Token definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the token.. - * - * @param properties The properties of the token. - * @return the next definition stage. - */ - WithCreate withProperties(TokenProperties properties); - } - } - - /** - * Begins update for the Token resource. - * - * @return the stage of resource update. - */ - Token.Update update(); - - /** - * The template for Token update. - */ - interface Update extends UpdateStages.WithScopeMapId, UpdateStages.WithStatus, UpdateStages.WithCredentials { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Token apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Token apply(Context context); - } - - /** - * The Token update stages. - */ - interface UpdateStages { - /** - * The stage of the Token update allowing to specify scopeMapId. - */ - interface WithScopeMapId { - /** - * Specifies the scopeMapId property: The resource ID of the scope map to which the token will be associated - * with.. - * - * @param scopeMapId The resource ID of the scope map to which the token will be associated with. - * @return the next definition stage. - */ - Update withScopeMapId(String scopeMapId); - } - - /** - * The stage of the Token update allowing to specify status. - */ - interface WithStatus { - /** - * Specifies the status property: The status of the token example enabled or disabled.. - * - * @param status The status of the token example enabled or disabled. - * @return the next definition stage. - */ - Update withStatus(TokenStatus status); - } - - /** - * The stage of the Token update allowing to specify credentials. - */ - interface WithCredentials { - /** - * Specifies the credentials property: The credentials that can be used for authenticating the token.. - * - * @param credentials The credentials that can be used for authenticating the token. - * @return the next definition stage. - */ - Update withCredentials(TokenCredentialsProperties credentials); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Token refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Token refresh(Context context); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java deleted file mode 100644 index bc409a221388..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The properties of a certificate used for authenticating a token. - */ -@Fluent -public final class TokenCertificate implements JsonSerializable { - /* - * The name property. - */ - private TokenCertificateName name; - - /* - * The expiry datetime of the certificate. - */ - private OffsetDateTime expiry; - - /* - * The thumbprint of the certificate. - */ - private String thumbprint; - - /* - * Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token. - */ - private String encodedPemCertificate; - - /** - * Creates an instance of TokenCertificate class. - */ - public TokenCertificate() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public TokenCertificateName name() { - return this.name; - } - - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the TokenCertificate object itself. - */ - public TokenCertificate withName(TokenCertificateName name) { - this.name = name; - return this; - } - - /** - * Get the expiry property: The expiry datetime of the certificate. - * - * @return the expiry value. - */ - public OffsetDateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry property: The expiry datetime of the certificate. - * - * @param expiry the expiry value to set. - * @return the TokenCertificate object itself. - */ - public TokenCertificate withExpiry(OffsetDateTime expiry) { - this.expiry = expiry; - return this; - } - - /** - * Get the thumbprint property: The thumbprint of the certificate. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint property: The thumbprint of the certificate. - * - * @param thumbprint the thumbprint value to set. - * @return the TokenCertificate object itself. - */ - public TokenCertificate withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the encodedPemCertificate property: Base 64 encoded string of the public certificate1 in PEM format that will - * be used for authenticating the token. - * - * @return the encodedPemCertificate value. - */ - public String encodedPemCertificate() { - return this.encodedPemCertificate; - } - - /** - * Set the encodedPemCertificate property: Base 64 encoded string of the public certificate1 in PEM format that will - * be used for authenticating the token. - * - * @param encodedPemCertificate the encodedPemCertificate value to set. - * @return the TokenCertificate object itself. - */ - public TokenCertificate withEncodedPemCertificate(String encodedPemCertificate) { - this.encodedPemCertificate = encodedPemCertificate; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - jsonWriter.writeStringField("expiry", - this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); - jsonWriter.writeStringField("thumbprint", this.thumbprint); - jsonWriter.writeStringField("encodedPemCertificate", this.encodedPemCertificate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenCertificate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenCertificate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenCertificate. - */ - public static TokenCertificate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenCertificate deserializedTokenCertificate = new TokenCertificate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedTokenCertificate.name = TokenCertificateName.fromString(reader.getString()); - } else if ("expiry".equals(fieldName)) { - deserializedTokenCertificate.expiry = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedTokenCertificate.thumbprint = reader.getString(); - } else if ("encodedPemCertificate".equals(fieldName)) { - deserializedTokenCertificate.encodedPemCertificate = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenCertificate; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java deleted file mode 100644 index 0bd47a4f7467..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for TokenCertificateName. - */ -public final class TokenCertificateName extends ExpandableStringEnum { - /** - * Static value certificate1 for TokenCertificateName. - */ - public static final TokenCertificateName CERTIFICATE1 = fromString("certificate1"); - - /** - * Static value certificate2 for TokenCertificateName. - */ - public static final TokenCertificateName CERTIFICATE2 = fromString("certificate2"); - - /** - * Creates a new instance of TokenCertificateName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TokenCertificateName() { - } - - /** - * Creates or finds a TokenCertificateName from its string representation. - * - * @param name a name to look for. - * @return the corresponding TokenCertificateName. - */ - public static TokenCertificateName fromString(String name) { - return fromString(name, TokenCertificateName.class); - } - - /** - * Gets known TokenCertificateName values. - * - * @return known TokenCertificateName values. - */ - public static Collection values() { - return values(TokenCertificateName.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java deleted file mode 100644 index 784dec848c1f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties of the credentials that can be used for authenticating the token. - */ -@Fluent -public final class TokenCredentialsProperties implements JsonSerializable { - /* - * The certificates property. - */ - private List certificates; - - /* - * The passwords property. - */ - private List passwords; - - /** - * Creates an instance of TokenCredentialsProperties class. - */ - public TokenCredentialsProperties() { - } - - /** - * Get the certificates property: The certificates property. - * - * @return the certificates value. - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates property: The certificates property. - * - * @param certificates the certificates value to set. - * @return the TokenCredentialsProperties object itself. - */ - public TokenCredentialsProperties withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the passwords property: The passwords property. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * Set the passwords property: The passwords property. - * - * @param passwords the passwords value to set. - * @return the TokenCredentialsProperties object itself. - */ - public TokenCredentialsProperties withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("certificates", this.certificates, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenCredentialsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenCredentialsProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenCredentialsProperties. - */ - public static TokenCredentialsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenCredentialsProperties deserializedTokenCredentialsProperties = new TokenCredentialsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificates".equals(fieldName)) { - List certificates - = reader.readArray(reader1 -> TokenCertificate.fromJson(reader1)); - deserializedTokenCredentialsProperties.certificates = certificates; - } else if ("passwords".equals(fieldName)) { - List passwords = reader.readArray(reader1 -> TokenPassword.fromJson(reader1)); - deserializedTokenCredentialsProperties.passwords = passwords; - } else { - reader.skipChildren(); - } - } - - return deserializedTokenCredentialsProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java deleted file mode 100644 index 729ab8f98a4b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The password that will be used for authenticating the token of a container registry. - */ -@Fluent -public final class TokenPassword implements JsonSerializable { - /* - * The creation datetime of the password. - */ - private OffsetDateTime creationTime; - - /* - * The expiry datetime of the password. - */ - private OffsetDateTime expiry; - - /* - * The password name "password1" or "password2" - */ - private TokenPasswordName name; - - /* - * The password value. - */ - private String value; - - /** - * Creates an instance of TokenPassword class. - */ - public TokenPassword() { - } - - /** - * Get the creationTime property: The creation datetime of the password. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Set the creationTime property: The creation datetime of the password. - * - * @param creationTime the creationTime value to set. - * @return the TokenPassword object itself. - */ - public TokenPassword withCreationTime(OffsetDateTime creationTime) { - this.creationTime = creationTime; - return this; - } - - /** - * Get the expiry property: The expiry datetime of the password. - * - * @return the expiry value. - */ - public OffsetDateTime expiry() { - return this.expiry; - } - - /** - * Set the expiry property: The expiry datetime of the password. - * - * @param expiry the expiry value to set. - * @return the TokenPassword object itself. - */ - public TokenPassword withExpiry(OffsetDateTime expiry) { - this.expiry = expiry; - return this; - } - - /** - * Get the name property: The password name "password1" or "password2". - * - * @return the name value. - */ - public TokenPasswordName name() { - return this.name; - } - - /** - * Set the name property: The password name "password1" or "password2". - * - * @param name the name value to set. - * @return the TokenPassword object itself. - */ - public TokenPassword withName(TokenPasswordName name) { - this.name = name; - return this; - } - - /** - * Get the value property: The password value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("creationTime", - this.creationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTime)); - jsonWriter.writeStringField("expiry", - this.expiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiry)); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenPassword from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenPassword if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenPassword. - */ - public static TokenPassword fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenPassword deserializedTokenPassword = new TokenPassword(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("creationTime".equals(fieldName)) { - deserializedTokenPassword.creationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("expiry".equals(fieldName)) { - deserializedTokenPassword.expiry = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("name".equals(fieldName)) { - deserializedTokenPassword.name = TokenPasswordName.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedTokenPassword.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenPassword; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java deleted file mode 100644 index c1bca1922745..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The password name "password1" or "password2". - */ -public final class TokenPasswordName extends ExpandableStringEnum { - /** - * Static value password1 for TokenPasswordName. - */ - public static final TokenPasswordName PASSWORD1 = fromString("password1"); - - /** - * Static value password2 for TokenPasswordName. - */ - public static final TokenPasswordName PASSWORD2 = fromString("password2"); - - /** - * Creates a new instance of TokenPasswordName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TokenPasswordName() { - } - - /** - * Creates or finds a TokenPasswordName from its string representation. - * - * @param name a name to look for. - * @return the corresponding TokenPasswordName. - */ - public static TokenPasswordName fromString(String name) { - return fromString(name, TokenPasswordName.class); - } - - /** - * Gets known TokenPasswordName values. - * - * @return known TokenPasswordName values. - */ - public static Collection values() { - return values(TokenPasswordName.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java deleted file mode 100644 index e4c5a8d72129..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The properties of a token. - */ -@Fluent -public final class TokenProperties implements JsonSerializable { - /* - * The creation date of scope map. - */ - private OffsetDateTime creationDate; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * The resource ID of the scope map to which the token will be associated with. - */ - private String scopeMapId; - - /* - * The credentials that can be used for authenticating the token. - */ - private TokenCredentialsProperties credentials; - - /* - * The status of the token example enabled or disabled. - */ - private TokenStatus status; - - /** - * Creates an instance of TokenProperties class. - */ - public TokenProperties() { - } - - /** - * Get the creationDate property: The creation date of scope map. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @return the scopeMapId value. - */ - public String scopeMapId() { - return this.scopeMapId; - } - - /** - * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @param scopeMapId the scopeMapId value to set. - * @return the TokenProperties object itself. - */ - public TokenProperties withScopeMapId(String scopeMapId) { - this.scopeMapId = scopeMapId; - return this; - } - - /** - * Get the credentials property: The credentials that can be used for authenticating the token. - * - * @return the credentials value. - */ - public TokenCredentialsProperties credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials that can be used for authenticating the token. - * - * @param credentials the credentials value to set. - * @return the TokenProperties object itself. - */ - public TokenProperties withCredentials(TokenCredentialsProperties credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the status property: The status of the token example enabled or disabled. - * - * @return the status value. - */ - public TokenStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the token example enabled or disabled. - * - * @param status the status value to set. - * @return the TokenProperties object itself. - */ - public TokenProperties withStatus(TokenStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scopeMapId", this.scopeMapId); - jsonWriter.writeJsonField("credentials", this.credentials); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenProperties. - */ - public static TokenProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenProperties deserializedTokenProperties = new TokenProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("creationDate".equals(fieldName)) { - deserializedTokenProperties.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedTokenProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("scopeMapId".equals(fieldName)) { - deserializedTokenProperties.scopeMapId = reader.getString(); - } else if ("credentials".equals(fieldName)) { - deserializedTokenProperties.credentials = TokenCredentialsProperties.fromJson(reader); - } else if ("status".equals(fieldName)) { - deserializedTokenProperties.status = TokenStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java deleted file mode 100644 index aaa50053528a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of the token example enabled or disabled. - */ -public final class TokenStatus extends ExpandableStringEnum { - /** - * Static value enabled for TokenStatus. - */ - public static final TokenStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for TokenStatus. - */ - public static final TokenStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of TokenStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TokenStatus() { - } - - /** - * Creates or finds a TokenStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding TokenStatus. - */ - public static TokenStatus fromString(String name) { - return fromString(name, TokenStatus.class); - } - - /** - * Gets known TokenStatus values. - * - * @return known TokenStatus values. - */ - public static Collection values() { - return values(TokenStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java deleted file mode 100644 index 56f18e2d3d88..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties; -import java.io.IOException; - -/** - * The parameters for updating a token. - */ -@Fluent -public final class TokenUpdateParameters implements JsonSerializable { - /* - * The properties of the token update parameters. - */ - private TokenUpdateProperties innerProperties; - - /** - * Creates an instance of TokenUpdateParameters class. - */ - public TokenUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the token update parameters. - * - * @return the innerProperties value. - */ - private TokenUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @return the scopeMapId value. - */ - public String scopeMapId() { - return this.innerProperties() == null ? null : this.innerProperties().scopeMapId(); - } - - /** - * Set the scopeMapId property: The resource ID of the scope map to which the token will be associated with. - * - * @param scopeMapId the scopeMapId value to set. - * @return the TokenUpdateParameters object itself. - */ - public TokenUpdateParameters withScopeMapId(String scopeMapId) { - if (this.innerProperties() == null) { - this.innerProperties = new TokenUpdateProperties(); - } - this.innerProperties().withScopeMapId(scopeMapId); - return this; - } - - /** - * Get the status property: The status of the token example enabled or disabled. - * - * @return the status value. - */ - public TokenStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The status of the token example enabled or disabled. - * - * @param status the status value to set. - * @return the TokenUpdateParameters object itself. - */ - public TokenUpdateParameters withStatus(TokenStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new TokenUpdateProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the credentials property: The credentials that can be used for authenticating the token. - * - * @return the credentials value. - */ - public TokenCredentialsProperties credentials() { - return this.innerProperties() == null ? null : this.innerProperties().credentials(); - } - - /** - * Set the credentials property: The credentials that can be used for authenticating the token. - * - * @param credentials the credentials value to set. - * @return the TokenUpdateParameters object itself. - */ - public TokenUpdateParameters withCredentials(TokenCredentialsProperties credentials) { - if (this.innerProperties() == null) { - this.innerProperties = new TokenUpdateProperties(); - } - this.innerProperties().withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenUpdateParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenUpdateParameters. - */ - public static TokenUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenUpdateParameters deserializedTokenUpdateParameters = new TokenUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedTokenUpdateParameters.innerProperties = TokenUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java deleted file mode 100644 index c15fa8932ec6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 Tokens. - */ -public interface Tokens { - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String tokenName, Context context); - - /** - * Gets the properties of the specified token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 properties of the specified token. - */ - Token get(String resourceGroupName, String registryName, String tokenName); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 registryName, String tokenName); - - /** - * Deletes a token from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param tokenName The name of the token. - * @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 delete(String resourceGroupName, String registryName, String tokenName, Context context); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Gets the properties of the specified token. - * - * @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 properties of the specified token along with {@link Response}. - */ - Token getById(String id); - - /** - * Gets the properties of the specified token. - * - * @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 properties of the specified token along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a token from a container registry. - * - * @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); - - /** - * Deletes a token from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Token resource. - * - * @param name resource name. - * @return the first stage of the new Token definition. - */ - Token.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java deleted file mode 100644 index f274f6f3d7fa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The content trust policy for a container registry. - */ -@Fluent -public final class TrustPolicy implements JsonSerializable { - /* - * The type of trust policy. - */ - private TrustPolicyType type; - - /* - * The value that indicates whether the policy is enabled or not. - */ - private PolicyStatus status; - - /** - * Creates an instance of TrustPolicy class. - */ - public TrustPolicy() { - } - - /** - * Get the type property: The type of trust policy. - * - * @return the type value. - */ - public TrustPolicyType type() { - return this.type; - } - - /** - * Set the type property: The type of trust policy. - * - * @param type the type value to set. - * @return the TrustPolicy object itself. - */ - public TrustPolicy withType(TrustPolicyType type) { - this.type = type; - return this; - } - - /** - * Get the status property: The value that indicates whether the policy is enabled or not. - * - * @return the status value. - */ - public PolicyStatus status() { - return this.status; - } - - /** - * Set the status property: The value that indicates whether the policy is enabled or not. - * - * @param status the status value to set. - * @return the TrustPolicy object itself. - */ - public TrustPolicy withStatus(PolicyStatus status) { - this.status = status; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TrustPolicy. - */ - public static TrustPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustPolicy deserializedTrustPolicy = new TrustPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedTrustPolicy.type = TrustPolicyType.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedTrustPolicy.status = PolicyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTrustPolicy; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java deleted file mode 100644 index de08fe200c67..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of trust policy. - */ -public final class TrustPolicyType extends ExpandableStringEnum { - /** - * Static value Notary for TrustPolicyType. - */ - public static final TrustPolicyType NOTARY = fromString("Notary"); - - /** - * Creates a new instance of TrustPolicyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TrustPolicyType() { - } - - /** - * Creates or finds a TrustPolicyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TrustPolicyType. - */ - public static TrustPolicyType fromString(String name) { - return fromString(name, TrustPolicyType.class); - } - - /** - * Gets known TrustPolicyType values. - * - * @return known TrustPolicyType values. - */ - public static Collection values() { - return values(TrustPolicyType.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java deleted file mode 100644 index a67e4f053eb9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UserIdentityProperties model. - */ -@Immutable -public final class UserIdentityProperties implements JsonSerializable { - /* - * The principal id of user assigned identity. - */ - private String principalId; - - /* - * The client id of user assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserIdentityProperties class. - */ - public UserIdentityProperties() { - } - - /** - * Get the principalId property: The principal id of user assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client id of user assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserIdentityProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserIdentityProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserIdentityProperties. - */ - public static UserIdentityProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserIdentityProperties deserializedUserIdentityProperties = new UserIdentityProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserIdentityProperties.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserIdentityProperties.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserIdentityProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java deleted file mode 100644 index 97a84720dd55..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java +++ /dev/null @@ -1,444 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of Webhook. - */ -public interface Webhook { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The properties of the webhook. - * - * @return the properties value. - */ - WebhookProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.containerregistry.generated.fluent.models.WebhookInner object. - * - * @return the inner object. - */ - WebhookInner innerModel(); - - /** - * The entirety of the Webhook definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Webhook definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Webhook definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Webhook definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The location of the webhook. This cannot be changed after the resource is created. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The location of the webhook. This cannot be changed after the resource is created. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the Webhook definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, registryName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @return the next definition stage. - */ - WithCreate withExistingRegistry(String resourceGroupName, String registryName); - } - - /** - * The stage of the Webhook 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.WithServiceUri, DefinitionStages.WithCustomHeaders, - DefinitionStages.WithStatus, DefinitionStages.WithScope, DefinitionStages.WithActions { - /** - * Executes the create request. - * - * @return the created resource. - */ - Webhook create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Webhook create(Context context); - } - - /** - * The stage of the Webhook definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags for the webhook.. - * - * @param tags The tags for the webhook. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the Webhook definition allowing to specify serviceUri. - */ - interface WithServiceUri { - /** - * Specifies the serviceUri property: The service URI for the webhook to post notifications.. - * - * @param serviceUri The service URI for the webhook to post notifications. - * @return the next definition stage. - */ - WithCreate withServiceUri(String serviceUri); - } - - /** - * The stage of the Webhook definition allowing to specify customHeaders. - */ - interface WithCustomHeaders { - /** - * Specifies the customHeaders property: Custom headers that will be added to the webhook notifications.. - * - * @param customHeaders Custom headers that will be added to the webhook notifications. - * @return the next definition stage. - */ - WithCreate withCustomHeaders(Map customHeaders); - } - - /** - * The stage of the Webhook definition allowing to specify status. - */ - interface WithStatus { - /** - * Specifies the status property: The status of the webhook at the time the operation was called.. - * - * @param status The status of the webhook at the time the operation was called. - * @return the next definition stage. - */ - WithCreate withStatus(WebhookStatus status); - } - - /** - * The stage of the Webhook definition allowing to specify scope. - */ - interface WithScope { - /** - * Specifies the scope property: The scope of repositories where the event can be triggered. For example, - * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. - * 'foo' is equivalent to 'foo:latest'. Empty means all events.. - * - * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is - * equivalent to 'foo:latest'. Empty means all events. - * @return the next definition stage. - */ - WithCreate withScope(String scope); - } - - /** - * The stage of the Webhook definition allowing to specify actions. - */ - interface WithActions { - /** - * Specifies the actions property: The list of actions that trigger the webhook to post notifications.. - * - * @param actions The list of actions that trigger the webhook to post notifications. - * @return the next definition stage. - */ - WithCreate withActions(List actions); - } - } - - /** - * Begins update for the Webhook resource. - * - * @return the stage of resource update. - */ - Webhook.Update update(); - - /** - * The template for Webhook update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithServiceUri, UpdateStages.WithCustomHeaders, - UpdateStages.WithStatus, UpdateStages.WithScope, UpdateStages.WithActions { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Webhook apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Webhook apply(Context context); - } - - /** - * The Webhook update stages. - */ - interface UpdateStages { - /** - * The stage of the Webhook update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags for the webhook.. - * - * @param tags The tags for the webhook. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Webhook update allowing to specify serviceUri. - */ - interface WithServiceUri { - /** - * Specifies the serviceUri property: The service URI for the webhook to post notifications.. - * - * @param serviceUri The service URI for the webhook to post notifications. - * @return the next definition stage. - */ - Update withServiceUri(String serviceUri); - } - - /** - * The stage of the Webhook update allowing to specify customHeaders. - */ - interface WithCustomHeaders { - /** - * Specifies the customHeaders property: Custom headers that will be added to the webhook notifications.. - * - * @param customHeaders Custom headers that will be added to the webhook notifications. - * @return the next definition stage. - */ - Update withCustomHeaders(Map customHeaders); - } - - /** - * The stage of the Webhook update allowing to specify status. - */ - interface WithStatus { - /** - * Specifies the status property: The status of the webhook at the time the operation was called.. - * - * @param status The status of the webhook at the time the operation was called. - * @return the next definition stage. - */ - Update withStatus(WebhookStatus status); - } - - /** - * The stage of the Webhook update allowing to specify scope. - */ - interface WithScope { - /** - * Specifies the scope property: The scope of repositories where the event can be triggered. For example, - * 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. - * 'foo' is equivalent to 'foo:latest'. Empty means all events.. - * - * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is - * equivalent to 'foo:latest'. Empty means all events. - * @return the next definition stage. - */ - Update withScope(String scope); - } - - /** - * The stage of the Webhook update allowing to specify actions. - */ - interface WithActions { - /** - * Specifies the actions property: The list of actions that trigger the webhook to post notifications.. - * - * @param actions The list of actions that trigger the webhook to post notifications. - * @return the next definition stage. - */ - Update withActions(List actions); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Webhook refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Webhook refresh(Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @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 basic information of an event along with {@link Response}. - */ - Response pingWithResponse(Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @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 basic information of an event. - */ - EventInfo ping(); - - /** - * Lists recent events for the specified webhook. - * - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - PagedIterable listEvents(); - - /** - * Lists recent events for the specified webhook. - * - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - PagedIterable listEvents(Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. - */ - Response getCallbackConfigWithResponse(Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @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 configuration of service URI and custom headers for the webhook. - */ - CallbackConfig getCallbackConfig(); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java deleted file mode 100644 index d40ee0d17134..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for WebhookAction. - */ -public final class WebhookAction extends ExpandableStringEnum { - /** - * Static value push for WebhookAction. - */ - public static final WebhookAction PUSH = fromString("push"); - - /** - * Static value delete for WebhookAction. - */ - public static final WebhookAction DELETE = fromString("delete"); - - /** - * Static value quarantine for WebhookAction. - */ - public static final WebhookAction QUARANTINE = fromString("quarantine"); - - /** - * Static value chart_push for WebhookAction. - */ - public static final WebhookAction CHART_PUSH = fromString("chart_push"); - - /** - * Static value chart_delete for WebhookAction. - */ - public static final WebhookAction CHART_DELETE = fromString("chart_delete"); - - /** - * Creates a new instance of WebhookAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WebhookAction() { - } - - /** - * Creates or finds a WebhookAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding WebhookAction. - */ - public static WebhookAction fromString(String name) { - return fromString(name, WebhookAction.class); - } - - /** - * Gets known WebhookAction values. - * - * @return known WebhookAction values. - */ - public static Collection values() { - return values(WebhookAction.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java deleted file mode 100644 index dd588d54c6b9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The parameters for creating a webhook. - */ -@Fluent -public final class WebhookCreateParameters implements JsonSerializable { - /* - * The tags for the webhook. - */ - private Map tags; - - /* - * The location of the webhook. This cannot be changed after the resource is created. - */ - private String location; - - /* - * The properties that the webhook will be created with. - */ - private WebhookPropertiesCreateParameters innerProperties; - - /** - * Creates an instance of WebhookCreateParameters class. - */ - public WebhookCreateParameters() { - } - - /** - * Get the tags property: The tags for the webhook. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags for the webhook. - * - * @param tags the tags value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the location property: The location of the webhook. This cannot be changed after the resource is created. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The location of the webhook. This cannot be changed after the resource is created. - * - * @param location the location value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the innerProperties property: The properties that the webhook will be created with. - * - * @return the innerProperties value. - */ - private WebhookPropertiesCreateParameters innerProperties() { - return this.innerProperties; - } - - /** - * Get the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - public String serviceUri() { - return this.innerProperties() == null ? null : this.innerProperties().serviceUri(); - } - - /** - * Set the serviceUri property: The service URI for the webhook to post notifications. - * - * @param serviceUri the serviceUri value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withServiceUri(String serviceUri) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesCreateParameters(); - } - this.innerProperties().withServiceUri(serviceUri); - return this; - } - - /** - * Get the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - public Map customHeaders() { - return this.innerProperties() == null ? null : this.innerProperties().customHeaders(); - } - - /** - * Set the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @param customHeaders the customHeaders value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withCustomHeaders(Map customHeaders) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesCreateParameters(); - } - this.innerProperties().withCustomHeaders(customHeaders); - return this; - } - - /** - * Get the status property: The status of the webhook at the time the operation was called. - * - * @return the status value. - */ - public WebhookStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The status of the webhook at the time the operation was called. - * - * @param status the status value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withStatus(WebhookStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesCreateParameters(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @return the scope value. - */ - public String scope() { - return this.innerProperties() == null ? null : this.innerProperties().scope(); - } - - /** - * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @param scope the scope value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withScope(String scope) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesCreateParameters(); - } - this.innerProperties().withScope(scope); - return this; - } - - /** - * Get the actions property: The list of actions that trigger the webhook to post notifications. - * - * @return the actions value. - */ - public List actions() { - return this.innerProperties() == null ? null : this.innerProperties().actions(); - } - - /** - * Set the actions property: The list of actions that trigger the webhook to post notifications. - * - * @param actions the actions value to set. - * @return the WebhookCreateParameters object itself. - */ - public WebhookCreateParameters withActions(List actions) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesCreateParameters(); - } - this.innerProperties().withActions(actions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookCreateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookCreateParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WebhookCreateParameters. - */ - public static WebhookCreateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookCreateParameters deserializedWebhookCreateParameters = new WebhookCreateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("location".equals(fieldName)) { - deserializedWebhookCreateParameters.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWebhookCreateParameters.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedWebhookCreateParameters.innerProperties - = WebhookPropertiesCreateParameters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookCreateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java deleted file mode 100644 index 6fef3e35d99e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties of a webhook. - */ -@Immutable -public final class WebhookProperties implements JsonSerializable { - /* - * The status of the webhook at the time the operation was called. - */ - private WebhookStatus status; - - /* - * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under - * repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all - * events. - */ - private String scope; - - /* - * The list of actions that trigger the webhook to post notifications. - */ - private List actions; - - /* - * The provisioning state of the webhook at the time the operation was called. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of WebhookProperties class. - */ - private WebhookProperties() { - } - - /** - * Get the status property: The status of the webhook at the time the operation was called. - * - * @return the status value. - */ - public WebhookStatus status() { - return this.status; - } - - /** - * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Get the actions property: The list of actions that trigger the webhook to post notifications. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Get the provisioningState property: The provisioning state of the webhook at the time the operation was called. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("actions", this.actions, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("scope", this.scope); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WebhookProperties. - */ - public static WebhookProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookProperties deserializedWebhookProperties = new WebhookProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actions".equals(fieldName)) { - List actions - = reader.readArray(reader1 -> WebhookAction.fromString(reader1.getString())); - deserializedWebhookProperties.actions = actions; - } else if ("status".equals(fieldName)) { - deserializedWebhookProperties.status = WebhookStatus.fromString(reader.getString()); - } else if ("scope".equals(fieldName)) { - deserializedWebhookProperties.scope = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedWebhookProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookProperties; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java deleted file mode 100644 index ec65eb717044..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of the webhook at the time the operation was called. - */ -public final class WebhookStatus extends ExpandableStringEnum { - /** - * Static value enabled for WebhookStatus. - */ - public static final WebhookStatus ENABLED = fromString("enabled"); - - /** - * Static value disabled for WebhookStatus. - */ - public static final WebhookStatus DISABLED = fromString("disabled"); - - /** - * Creates a new instance of WebhookStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WebhookStatus() { - } - - /** - * Creates or finds a WebhookStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding WebhookStatus. - */ - public static WebhookStatus fromString(String name) { - return fromString(name, WebhookStatus.class); - } - - /** - * Gets known WebhookStatus values. - * - * @return known WebhookStatus values. - */ - public static Collection values() { - return values(WebhookStatus.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java deleted file mode 100644 index 4e892560b242..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The parameters for updating a webhook. - */ -@Fluent -public final class WebhookUpdateParameters implements JsonSerializable { - /* - * The tags for the webhook. - */ - private Map tags; - - /* - * The properties that the webhook will be updated with. - */ - private WebhookPropertiesUpdateParameters innerProperties; - - /** - * Creates an instance of WebhookUpdateParameters class. - */ - public WebhookUpdateParameters() { - } - - /** - * Get the tags property: The tags for the webhook. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags for the webhook. - * - * @param tags the tags value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: The properties that the webhook will be updated with. - * - * @return the innerProperties value. - */ - private WebhookPropertiesUpdateParameters innerProperties() { - return this.innerProperties; - } - - /** - * Get the serviceUri property: The service URI for the webhook to post notifications. - * - * @return the serviceUri value. - */ - public String serviceUri() { - return this.innerProperties() == null ? null : this.innerProperties().serviceUri(); - } - - /** - * Set the serviceUri property: The service URI for the webhook to post notifications. - * - * @param serviceUri the serviceUri value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withServiceUri(String serviceUri) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesUpdateParameters(); - } - this.innerProperties().withServiceUri(serviceUri); - return this; - } - - /** - * Get the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @return the customHeaders value. - */ - public Map customHeaders() { - return this.innerProperties() == null ? null : this.innerProperties().customHeaders(); - } - - /** - * Set the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @param customHeaders the customHeaders value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withCustomHeaders(Map customHeaders) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesUpdateParameters(); - } - this.innerProperties().withCustomHeaders(customHeaders); - return this; - } - - /** - * Get the status property: The status of the webhook at the time the operation was called. - * - * @return the status value. - */ - public WebhookStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The status of the webhook at the time the operation was called. - * - * @param status the status value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withStatus(WebhookStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesUpdateParameters(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @return the scope value. - */ - public String scope() { - return this.innerProperties() == null ? null : this.innerProperties().scope(); - } - - /** - * Set the scope property: The scope of repositories where the event can be triggered. For example, 'foo:*' means - * events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to - * 'foo:latest'. Empty means all events. - * - * @param scope the scope value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withScope(String scope) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesUpdateParameters(); - } - this.innerProperties().withScope(scope); - return this; - } - - /** - * Get the actions property: The list of actions that trigger the webhook to post notifications. - * - * @return the actions value. - */ - public List actions() { - return this.innerProperties() == null ? null : this.innerProperties().actions(); - } - - /** - * Set the actions property: The list of actions that trigger the webhook to post notifications. - * - * @param actions the actions value to set. - * @return the WebhookUpdateParameters object itself. - */ - public WebhookUpdateParameters withActions(List actions) { - if (this.innerProperties() == null) { - this.innerProperties = new WebhookPropertiesUpdateParameters(); - } - this.innerProperties().withActions(actions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebhookUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebhookUpdateParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebhookUpdateParameters. - */ - public static WebhookUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebhookUpdateParameters deserializedWebhookUpdateParameters = new WebhookUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWebhookUpdateParameters.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedWebhookUpdateParameters.innerProperties - = WebhookPropertiesUpdateParameters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhookUpdateParameters; - }); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java deleted file mode 100644 index c3664a760d25..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.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 Webhooks. - */ -public interface Webhooks { - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Gets the properties of the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 properties of the specified webhook. - */ - Webhook get(String resourceGroupName, String registryName, String webhookName); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 registryName, String webhookName); - - /** - * Deletes a webhook from a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 delete(String resourceGroupName, String registryName, String webhookName, Context context); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event along with {@link Response}. - */ - Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context); - - /** - * Triggers a ping event to be sent to the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 basic information of an event. - */ - EventInfo ping(String resourceGroupName, String registryName, String webhookName); - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName); - - /** - * Lists recent events for the specified webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 result of a request to list events for a webhook as paginated response with {@link PagedIterable}. - */ - PagedIterable listEvents(String resourceGroupName, String registryName, String webhookName, Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. - */ - Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context); - - /** - * Gets the configuration of service URI and custom headers for the webhook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. - * @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 configuration of service URI and custom headers for the webhook. - */ - CallbackConfig getCallbackConfig(String resourceGroupName, String registryName, String webhookName); - - /** - * Gets the properties of the specified webhook. - * - * @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 properties of the specified webhook along with {@link Response}. - */ - Webhook getById(String id); - - /** - * Gets the properties of the specified webhook. - * - * @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 properties of the specified webhook along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a webhook from a container registry. - * - * @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); - - /** - * Deletes a webhook from a container registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Webhook resource. - * - * @param name resource name. - * @return the first stage of the new Webhook definition. - */ - Webhook.DefinitionStages.Blank define(String name); -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java deleted file mode 100644 index 7491efbdea66..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether or not zone redundancy is enabled for this container registry. - */ -public final class ZoneRedundancy extends ExpandableStringEnum { - /** - * Static value Enabled for ZoneRedundancy. - */ - public static final ZoneRedundancy ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ZoneRedundancy. - */ - public static final ZoneRedundancy DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ZoneRedundancy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneRedundancy() { - } - - /** - * Creates or finds a ZoneRedundancy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneRedundancy. - */ - public static ZoneRedundancy fromString(String name) { - return fromString(name, ZoneRedundancy.class); - } - - /** - * Gets known ZoneRedundancy values. - * - * @return known ZoneRedundancy values. - */ - public static Collection values() { - return values(ZoneRedundancy.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java deleted file mode 100644 index 72df85ec68d3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the data models for ContainerRegistry. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -package com.azure.resourcemanager.containerregistry.generated.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java deleted file mode 100644 index 3c148de171c8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the classes for ContainerRegistry. - * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for - * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry - * components. - */ -package com.azure.resourcemanager.containerregistry.generated; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java deleted file mode 100644 index 7cb04140c48b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.containerregistry.generated { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.containerregistry.generated; - exports com.azure.resourcemanager.containerregistry.generated.fluent; - exports com.azure.resourcemanager.containerregistry.generated.fluent.models; - exports com.azure.resourcemanager.containerregistry.generated.models; - - opens com.azure.resourcemanager.containerregistry.generated.fluent.models to com.azure.core; - opens com.azure.resourcemanager.containerregistry.generated.models to com.azure.core; - opens com.azure.resourcemanager.containerregistry.generated.implementation.models to com.azure.core; -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json deleted file mode 100644 index 049a9acdaf79..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_apiview_properties.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "flavor": "azure", - "CrossLanguageDefinitionId": { - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient": "Microsoft.ContainerRegistry.CacheRules", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginCreate": "Microsoft.ContainerRegistry.CacheRules.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginDelete": "Microsoft.ContainerRegistry.CacheRules.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginUpdate": "Microsoft.ContainerRegistry.CacheRules.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.create": "Microsoft.ContainerRegistry.CacheRules.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.delete": "Microsoft.ContainerRegistry.CacheRules.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.get": "Microsoft.ContainerRegistry.CacheRules.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.getWithResponse": "Microsoft.ContainerRegistry.CacheRules.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.list": "Microsoft.ContainerRegistry.CacheRules.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.update": "Microsoft.ContainerRegistry.CacheRules.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient": "Microsoft.ContainerRegistry.ConnectedRegistries", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginCreate": "Microsoft.ContainerRegistry.ConnectedRegistries.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDeactivate": "Microsoft.ContainerRegistry.ConnectedRegistries.deactivate", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDelete": "Microsoft.ContainerRegistry.ConnectedRegistries.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginUpdate": "Microsoft.ContainerRegistry.ConnectedRegistries.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.create": "Microsoft.ContainerRegistry.ConnectedRegistries.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.deactivate": "Microsoft.ContainerRegistry.ConnectedRegistries.deactivate", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.delete": "Microsoft.ContainerRegistry.ConnectedRegistries.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.get": "Microsoft.ContainerRegistry.ConnectedRegistries.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.getWithResponse": "Microsoft.ContainerRegistry.ConnectedRegistries.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.list": "Microsoft.ContainerRegistry.ConnectedRegistries.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.update": "Microsoft.ContainerRegistry.ConnectedRegistries.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient": "Microsoft.ContainerRegistry", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient": "Microsoft.ContainerRegistry.CredentialSets", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginCreate": "Microsoft.ContainerRegistry.CredentialSets.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginDelete": "Microsoft.ContainerRegistry.CredentialSets.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginUpdate": "Microsoft.ContainerRegistry.CredentialSets.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.create": "Microsoft.ContainerRegistry.CredentialSets.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.delete": "Microsoft.ContainerRegistry.CredentialSets.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.get": "Microsoft.ContainerRegistry.CredentialSets.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.getWithResponse": "Microsoft.ContainerRegistry.CredentialSets.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.list": "Microsoft.ContainerRegistry.CredentialSets.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.update": "Microsoft.ContainerRegistry.CredentialSets.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient": "Microsoft.ContainerRegistry.Operations", - "com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient.list": "Azure.ResourceManager.Legacy.Operations.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient": "Microsoft.ContainerRegistry.PrivateEndpointConnections", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate": "Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginDelete": "Microsoft.ContainerRegistry.PrivateEndpointConnections.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.createOrUpdate": "Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.delete": "Microsoft.ContainerRegistry.PrivateEndpointConnections.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.get": "Microsoft.ContainerRegistry.PrivateEndpointConnections.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.getWithResponse": "Microsoft.ContainerRegistry.PrivateEndpointConnections.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.list": "Microsoft.ContainerRegistry.PrivateEndpointConnections.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient": "Microsoft.ContainerRegistry.Registries", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginCreate": "Microsoft.ContainerRegistry.Registries.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginDelete": "Microsoft.ContainerRegistry.Registries.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginGenerateCredentials": "Microsoft.ContainerRegistry.Registries.generateCredentials", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginImportImage": "Microsoft.ContainerRegistry.Registries.importImage", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginUpdate": "Microsoft.ContainerRegistry.Registries.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailability": "Microsoft.ContainerRegistry.Registries.checkNameAvailability", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailabilityWithResponse": "Microsoft.ContainerRegistry.Registries.checkNameAvailability", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.create": "Microsoft.ContainerRegistry.Registries.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.delete": "Microsoft.ContainerRegistry.Registries.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.generateCredentials": "Microsoft.ContainerRegistry.Registries.generateCredentials", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroup": "Microsoft.ContainerRegistry.Registries.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroupWithResponse": "Microsoft.ContainerRegistry.Registries.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResource": "Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResourceWithResponse": "Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.importImage": "Microsoft.ContainerRegistry.Registries.importImage", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.list": "Microsoft.ContainerRegistry.Registries.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listByResourceGroup": "Microsoft.ContainerRegistry.Registries.listByResourceGroup", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentials": "Microsoft.ContainerRegistry.Registries.listCredentials", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentialsWithResponse": "Microsoft.ContainerRegistry.Registries.listCredentials", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listPrivateLinkResources": "Microsoft.ContainerRegistry.PrivateLinkResources.listPrivateLinkResources", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsages": "Microsoft.ContainerRegistry.Registries.listUsages", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsagesWithResponse": "Microsoft.ContainerRegistry.Registries.listUsages", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredential": "Microsoft.ContainerRegistry.Registries.regenerateCredential", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredentialWithResponse": "Microsoft.ContainerRegistry.Registries.regenerateCredential", - "com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.update": "Microsoft.ContainerRegistry.Registries.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient": "Microsoft.ContainerRegistry.Replications", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginCreate": "Microsoft.ContainerRegistry.Replications.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginDelete": "Microsoft.ContainerRegistry.Replications.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginUpdate": "Microsoft.ContainerRegistry.Replications.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.create": "Microsoft.ContainerRegistry.Replications.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.delete": "Microsoft.ContainerRegistry.Replications.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.get": "Microsoft.ContainerRegistry.Replications.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.getWithResponse": "Microsoft.ContainerRegistry.Replications.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.list": "Microsoft.ContainerRegistry.Replications.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.update": "Microsoft.ContainerRegistry.Replications.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient": "Microsoft.ContainerRegistry.ScopeMaps", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginCreate": "Microsoft.ContainerRegistry.ScopeMaps.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginDelete": "Microsoft.ContainerRegistry.ScopeMaps.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginUpdate": "Microsoft.ContainerRegistry.ScopeMaps.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.create": "Microsoft.ContainerRegistry.ScopeMaps.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.delete": "Microsoft.ContainerRegistry.ScopeMaps.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.get": "Microsoft.ContainerRegistry.ScopeMaps.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.getWithResponse": "Microsoft.ContainerRegistry.ScopeMaps.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.list": "Microsoft.ContainerRegistry.ScopeMaps.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.update": "Microsoft.ContainerRegistry.ScopeMaps.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient": "Microsoft.ContainerRegistry.Tokens", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginCreate": "Microsoft.ContainerRegistry.Tokens.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginDelete": "Microsoft.ContainerRegistry.Tokens.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginUpdate": "Microsoft.ContainerRegistry.Tokens.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.create": "Microsoft.ContainerRegistry.Tokens.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.delete": "Microsoft.ContainerRegistry.Tokens.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.get": "Microsoft.ContainerRegistry.Tokens.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.getWithResponse": "Microsoft.ContainerRegistry.Tokens.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.list": "Microsoft.ContainerRegistry.Tokens.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.update": "Microsoft.ContainerRegistry.Tokens.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient": "Microsoft.ContainerRegistry.Webhooks", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginCreate": "Microsoft.ContainerRegistry.Webhooks.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginDelete": "Microsoft.ContainerRegistry.Webhooks.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginUpdate": "Microsoft.ContainerRegistry.Webhooks.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.create": "Microsoft.ContainerRegistry.Webhooks.create", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.delete": "Microsoft.ContainerRegistry.Webhooks.delete", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.get": "Microsoft.ContainerRegistry.Webhooks.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfig": "Microsoft.ContainerRegistry.Webhooks.getCallbackConfig", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfigWithResponse": "Microsoft.ContainerRegistry.Webhooks.getCallbackConfig", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getWithResponse": "Microsoft.ContainerRegistry.Webhooks.get", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.list": "Microsoft.ContainerRegistry.Webhooks.list", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.listEvents": "Microsoft.ContainerRegistry.Webhooks.listEvents", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.ping": "Microsoft.ContainerRegistry.Webhooks.ping", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.pingWithResponse": "Microsoft.ContainerRegistry.Webhooks.ping", - "com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.update": "Microsoft.ContainerRegistry.Webhooks.update", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner": "Microsoft.ContainerRegistry.CacheRule", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties": "Microsoft.ContainerRegistry.CacheRuleUpdateProperties", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner": "Microsoft.ContainerRegistry.CallbackConfig", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner": "Microsoft.ContainerRegistry.ConnectedRegistry", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties": "Microsoft.ContainerRegistry.ConnectedRegistryUpdateProperties", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner": "Microsoft.ContainerRegistry.CredentialSet", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties": "Microsoft.ContainerRegistry.CredentialSetUpdateProperties", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner": "Microsoft.ContainerRegistry.EventInfo", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner": "Microsoft.ContainerRegistry.Event", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner": "Microsoft.ContainerRegistry.GenerateCredentialsResult", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner": "Microsoft.ContainerRegistry.OperationDefinition", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition": "Microsoft.ContainerRegistry.OperationPropertiesDefinition", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner": "Microsoft.ContainerRegistry.PrivateEndpointConnection", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner": "Azure.ResourceManager.CommonTypes.PrivateLinkResource", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner": "Microsoft.ContainerRegistry.Registry", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner": "Microsoft.ContainerRegistry.RegistryListCredentialsResult", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner": "Microsoft.ContainerRegistry.RegistryNameStatus", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters": "Microsoft.ContainerRegistry.RegistryPropertiesUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner": "Microsoft.ContainerRegistry.RegistryUsageListResult", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner": "Microsoft.ContainerRegistry.Replication", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties": "Microsoft.ContainerRegistry.ReplicationUpdateParametersProperties", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner": "Microsoft.ContainerRegistry.ScopeMap", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters": "Microsoft.ContainerRegistry.ScopeMapPropertiesUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner": "Microsoft.ContainerRegistry.Token", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties": "Microsoft.ContainerRegistry.TokenUpdateProperties", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner": "Microsoft.ContainerRegistry.Webhook", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters": "Microsoft.ContainerRegistry.WebhookPropertiesCreateParameters", - "com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters": "Microsoft.ContainerRegistry.WebhookPropertiesUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder": "Microsoft.ContainerRegistry", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult": "Microsoft.ContainerRegistry.CacheRulesListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult": "Microsoft.ContainerRegistry.ConnectedRegistryListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult": "Microsoft.ContainerRegistry.CredentialSetListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult": "Microsoft.ContainerRegistry.EventListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult": "Microsoft.ContainerRegistry.OperationListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult": "Microsoft.ContainerRegistry.PrivateEndpointConnectionListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult": "Microsoft.ContainerRegistry.PrivateLinkResourceListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult": "Microsoft.ContainerRegistry.RegistryListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult": "Microsoft.ContainerRegistry.ReplicationListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult": "Microsoft.ContainerRegistry.ScopeMapListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult": "Microsoft.ContainerRegistry.TokenListResult", - "com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult": "Microsoft.ContainerRegistry.WebhookListResult", - "com.azure.resourcemanager.containerregistry.generated.models.Action": "Microsoft.ContainerRegistry.Action", - "com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired": "Microsoft.ContainerRegistry.ActionsRequired", - "com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties": "Microsoft.ContainerRegistry.ActivationProperties", - "com.azure.resourcemanager.containerregistry.generated.models.ActivationStatus": "Microsoft.ContainerRegistry.ActivationStatus", - "com.azure.resourcemanager.containerregistry.generated.models.Actor": "Microsoft.ContainerRegistry.Actor", - "com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus": "Microsoft.ContainerRegistry.AuditLogStatus", - "com.azure.resourcemanager.containerregistry.generated.models.AuthCredential": "Microsoft.ContainerRegistry.AuthCredential", - "com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy": "Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicy", - "com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus": "Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicyStatus", - "com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties": "Microsoft.ContainerRegistry.CacheRuleProperties", - "com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters": "Microsoft.ContainerRegistry.CacheRuleUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.CertificateType": "Microsoft.ContainerRegistry.CertificateType", - "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode": "Microsoft.ContainerRegistry.ConnectedRegistryMode", - "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties": "Microsoft.ContainerRegistry.ConnectedRegistryProperties", - "com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters": "Microsoft.ContainerRegistry.ConnectedRegistryUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.ConnectionState": "Microsoft.ContainerRegistry.ConnectionState", - "com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus": "Microsoft.ContainerRegistry.ConnectionStatus", - "com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType": "Microsoft.ContainerRegistry.ContainerRegistryResourceType", - "com.azure.resourcemanager.containerregistry.generated.models.CredentialHealth": "Microsoft.ContainerRegistry.CredentialHealth", - "com.azure.resourcemanager.containerregistry.generated.models.CredentialHealthStatus": "Microsoft.ContainerRegistry.CredentialHealthStatus", - "com.azure.resourcemanager.containerregistry.generated.models.CredentialName": "Microsoft.ContainerRegistry.CredentialName", - "com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties": "Microsoft.ContainerRegistry.CredentialSetProperties", - "com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters": "Microsoft.ContainerRegistry.CredentialSetUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.DefaultAction": "Microsoft.ContainerRegistry.DefaultAction", - "com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty": "Microsoft.ContainerRegistry.EncryptionProperty", - "com.azure.resourcemanager.containerregistry.generated.models.EncryptionStatus": "Microsoft.ContainerRegistry.EncryptionStatus", - "com.azure.resourcemanager.containerregistry.generated.models.EventContent": "Microsoft.ContainerRegistry.EventContent", - "com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage": "Microsoft.ContainerRegistry.EventRequestMessage", - "com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage": "Microsoft.ContainerRegistry.EventResponseMessage", - "com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy": "Microsoft.ContainerRegistry.ExportPolicy", - "com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus": "Microsoft.ContainerRegistry.ExportPolicyStatus", - "com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties": "Microsoft.ContainerRegistry.GarbageCollectionProperties", - "com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters": "Microsoft.ContainerRegistry.GenerateCredentialsParameters", - "com.azure.resourcemanager.containerregistry.generated.models.IPRule": "Microsoft.ContainerRegistry.IPRule", - "com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties": "Microsoft.ContainerRegistry.IdentityProperties", - "com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters": "Microsoft.ContainerRegistry.ImportImageParameters", - "com.azure.resourcemanager.containerregistry.generated.models.ImportMode": "Microsoft.ContainerRegistry.ImportMode", - "com.azure.resourcemanager.containerregistry.generated.models.ImportSource": "Microsoft.ContainerRegistry.ImportSource", - "com.azure.resourcemanager.containerregistry.generated.models.ImportSourceCredentials": "Microsoft.ContainerRegistry.ImportSourceCredentials", - "com.azure.resourcemanager.containerregistry.generated.models.KeyVaultProperties": "Microsoft.ContainerRegistry.KeyVaultProperties", - "com.azure.resourcemanager.containerregistry.generated.models.LogLevel": "Microsoft.ContainerRegistry.LogLevel", - "com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties": "Microsoft.ContainerRegistry.LoggingProperties", - "com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties": "Microsoft.ContainerRegistry.LoginServerProperties", - "com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions": "Microsoft.ContainerRegistry.NetworkRuleBypassOptions", - "com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet": "Microsoft.ContainerRegistry.NetworkRuleSet", - "com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition": "Microsoft.ContainerRegistry.OperationDisplayDefinition", - "com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition": "Microsoft.ContainerRegistry.OperationLogSpecificationDefinition", - "com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition": "Microsoft.ContainerRegistry.OperationMetricSpecificationDefinition", - "com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition": "Microsoft.ContainerRegistry.OperationServiceSpecificationDefinition", - "com.azure.resourcemanager.containerregistry.generated.models.ParentProperties": "Microsoft.ContainerRegistry.ParentProperties", - "com.azure.resourcemanager.containerregistry.generated.models.PasswordName": "Microsoft.ContainerRegistry.PasswordName", - "com.azure.resourcemanager.containerregistry.generated.models.Policies": "Microsoft.ContainerRegistry.Policies", - "com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus": "Microsoft.ContainerRegistry.PolicyStatus", - "com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint": "Microsoft.ContainerRegistry.PrivateEndpoint", - "com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties": "Microsoft.ContainerRegistry.PrivateEndpointConnectionProperties", - "com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", - "com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState": "Microsoft.ContainerRegistry.PrivateLinkServiceConnectionState", - "com.azure.resourcemanager.containerregistry.generated.models.ProvisioningState": "Microsoft.ContainerRegistry.ProvisioningState", - "com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess": "Microsoft.ContainerRegistry.PublicNetworkAccess", - "com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy": "Microsoft.ContainerRegistry.QuarantinePolicy", - "com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters": "Microsoft.ContainerRegistry.RegenerateCredentialParameters", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest": "Microsoft.ContainerRegistry.RegistryNameCheckRequest", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword": "Microsoft.ContainerRegistry.RegistryPassword", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties": "Microsoft.ContainerRegistry.RegistryProperties", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters": "Microsoft.ContainerRegistry.RegistryUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage": "Microsoft.ContainerRegistry.RegistryUsage", - "com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit": "Microsoft.ContainerRegistry.RegistryUsageUnit", - "com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties": "Microsoft.ContainerRegistry.ReplicationProperties", - "com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters": "Microsoft.ContainerRegistry.ReplicationUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.Request": "Microsoft.ContainerRegistry.Request", - "com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType": "Microsoft.ContainerRegistry.ResourceIdentityType", - "com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy": "Microsoft.ContainerRegistry.RetentionPolicy", - "com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode": "Microsoft.ContainerRegistry.RoleAssignmentMode", - "com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties": "Microsoft.ContainerRegistry.ScopeMapProperties", - "com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters": "Microsoft.ContainerRegistry.ScopeMapUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.Sku": "Microsoft.ContainerRegistry.Sku", - "com.azure.resourcemanager.containerregistry.generated.models.SkuName": "Microsoft.ContainerRegistry.SkuName", - "com.azure.resourcemanager.containerregistry.generated.models.SkuTier": "Microsoft.ContainerRegistry.SkuTier", - "com.azure.resourcemanager.containerregistry.generated.models.Source": "Microsoft.ContainerRegistry.Source", - "com.azure.resourcemanager.containerregistry.generated.models.Status": "Microsoft.ContainerRegistry.Status", - "com.azure.resourcemanager.containerregistry.generated.models.StatusDetailProperties": "Microsoft.ContainerRegistry.StatusDetailProperties", - "com.azure.resourcemanager.containerregistry.generated.models.SyncProperties": "Microsoft.ContainerRegistry.SyncProperties", - "com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties": "Microsoft.ContainerRegistry.SyncUpdateProperties", - "com.azure.resourcemanager.containerregistry.generated.models.Target": "Microsoft.ContainerRegistry.Target", - "com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties": "Microsoft.ContainerRegistry.TlsCertificateProperties", - "com.azure.resourcemanager.containerregistry.generated.models.TlsProperties": "Microsoft.ContainerRegistry.TlsProperties", - "com.azure.resourcemanager.containerregistry.generated.models.TlsStatus": "Microsoft.ContainerRegistry.TlsStatus", - "com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate": "Microsoft.ContainerRegistry.TokenCertificate", - "com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName": "Microsoft.ContainerRegistry.TokenCertificateName", - "com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties": "Microsoft.ContainerRegistry.TokenCredentialsProperties", - "com.azure.resourcemanager.containerregistry.generated.models.TokenPassword": "Microsoft.ContainerRegistry.TokenPassword", - "com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName": "Microsoft.ContainerRegistry.TokenPasswordName", - "com.azure.resourcemanager.containerregistry.generated.models.TokenProperties": "Microsoft.ContainerRegistry.TokenProperties", - "com.azure.resourcemanager.containerregistry.generated.models.TokenStatus": "Microsoft.ContainerRegistry.TokenStatus", - "com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters": "Microsoft.ContainerRegistry.TokenUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy": "Microsoft.ContainerRegistry.TrustPolicy", - "com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType": "Microsoft.ContainerRegistry.TrustPolicyType", - "com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties": "Microsoft.ContainerRegistry.UserIdentityProperties", - "com.azure.resourcemanager.containerregistry.generated.models.WebhookAction": "Microsoft.ContainerRegistry.WebhookAction", - "com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters": "Microsoft.ContainerRegistry.WebhookCreateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties": "Microsoft.ContainerRegistry.WebhookProperties", - "com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus": "Microsoft.ContainerRegistry.WebhookStatus", - "com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters": "Microsoft.ContainerRegistry.WebhookUpdateParameters", - "com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy": "Microsoft.ContainerRegistry.ZoneRedundancy" - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json deleted file mode 100644 index b16a72dec8d3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/azure-resourcemanager-containerregistry-generated_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"azure","apiVersion":"2025-11-01","crossLanguageDefinitions":{"com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient":"Microsoft.ContainerRegistry.CacheRules","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginCreate":"Microsoft.ContainerRegistry.CacheRules.create","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginDelete":"Microsoft.ContainerRegistry.CacheRules.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.beginUpdate":"Microsoft.ContainerRegistry.CacheRules.update","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.create":"Microsoft.ContainerRegistry.CacheRules.create","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.delete":"Microsoft.ContainerRegistry.CacheRules.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.get":"Microsoft.ContainerRegistry.CacheRules.get","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.getWithResponse":"Microsoft.ContainerRegistry.CacheRules.get","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.list":"Microsoft.ContainerRegistry.CacheRules.list","com.azure.resourcemanager.containerregistry.generated.fluent.CacheRulesClient.update":"Microsoft.ContainerRegistry.CacheRules.update","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient":"Microsoft.ContainerRegistry.ConnectedRegistries","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginCreate":"Microsoft.ContainerRegistry.ConnectedRegistries.create","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDeactivate":"Microsoft.ContainerRegistry.ConnectedRegistries.deactivate","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginDelete":"Microsoft.ContainerRegistry.ConnectedRegistries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.beginUpdate":"Microsoft.ContainerRegistry.ConnectedRegistries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.create":"Microsoft.ContainerRegistry.ConnectedRegistries.create","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.deactivate":"Microsoft.ContainerRegistry.ConnectedRegistries.deactivate","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.delete":"Microsoft.ContainerRegistry.ConnectedRegistries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.get":"Microsoft.ContainerRegistry.ConnectedRegistries.get","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.getWithResponse":"Microsoft.ContainerRegistry.ConnectedRegistries.get","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.list":"Microsoft.ContainerRegistry.ConnectedRegistries.list","com.azure.resourcemanager.containerregistry.generated.fluent.ConnectedRegistriesClient.update":"Microsoft.ContainerRegistry.ConnectedRegistries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ContainerRegistryManagementClient":"Microsoft.ContainerRegistry","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient":"Microsoft.ContainerRegistry.CredentialSets","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginCreate":"Microsoft.ContainerRegistry.CredentialSets.create","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginDelete":"Microsoft.ContainerRegistry.CredentialSets.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.beginUpdate":"Microsoft.ContainerRegistry.CredentialSets.update","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.create":"Microsoft.ContainerRegistry.CredentialSets.create","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.delete":"Microsoft.ContainerRegistry.CredentialSets.delete","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.get":"Microsoft.ContainerRegistry.CredentialSets.get","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.getWithResponse":"Microsoft.ContainerRegistry.CredentialSets.get","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.list":"Microsoft.ContainerRegistry.CredentialSets.list","com.azure.resourcemanager.containerregistry.generated.fluent.CredentialSetsClient.update":"Microsoft.ContainerRegistry.CredentialSets.update","com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient":"Microsoft.ContainerRegistry.Operations","com.azure.resourcemanager.containerregistry.generated.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient":"Microsoft.ContainerRegistry.PrivateEndpointConnections","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate":"Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.ContainerRegistry.PrivateEndpointConnections.delete","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.ContainerRegistry.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.ContainerRegistry.PrivateEndpointConnections.delete","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.ContainerRegistry.PrivateEndpointConnections.get","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.ContainerRegistry.PrivateEndpointConnections.get","com.azure.resourcemanager.containerregistry.generated.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.ContainerRegistry.PrivateEndpointConnections.list","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient":"Microsoft.ContainerRegistry.Registries","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginCreate":"Microsoft.ContainerRegistry.Registries.create","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginDelete":"Microsoft.ContainerRegistry.Registries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginGenerateCredentials":"Microsoft.ContainerRegistry.Registries.generateCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginImportImage":"Microsoft.ContainerRegistry.Registries.importImage","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.beginUpdate":"Microsoft.ContainerRegistry.Registries.update","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailability":"Microsoft.ContainerRegistry.Registries.checkNameAvailability","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.checkNameAvailabilityWithResponse":"Microsoft.ContainerRegistry.Registries.checkNameAvailability","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.create":"Microsoft.ContainerRegistry.Registries.create","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.delete":"Microsoft.ContainerRegistry.Registries.delete","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.generateCredentials":"Microsoft.ContainerRegistry.Registries.generateCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroup":"Microsoft.ContainerRegistry.Registries.get","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getByResourceGroupWithResponse":"Microsoft.ContainerRegistry.Registries.get","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResource":"Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.getPrivateLinkResourceWithResponse":"Microsoft.ContainerRegistry.PrivateLinkResources.getPrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.importImage":"Microsoft.ContainerRegistry.Registries.importImage","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.list":"Microsoft.ContainerRegistry.Registries.list","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listByResourceGroup":"Microsoft.ContainerRegistry.Registries.listByResourceGroup","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentials":"Microsoft.ContainerRegistry.Registries.listCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listCredentialsWithResponse":"Microsoft.ContainerRegistry.Registries.listCredentials","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listPrivateLinkResources":"Microsoft.ContainerRegistry.PrivateLinkResources.listPrivateLinkResources","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsages":"Microsoft.ContainerRegistry.Registries.listUsages","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.listUsagesWithResponse":"Microsoft.ContainerRegistry.Registries.listUsages","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredential":"Microsoft.ContainerRegistry.Registries.regenerateCredential","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.regenerateCredentialWithResponse":"Microsoft.ContainerRegistry.Registries.regenerateCredential","com.azure.resourcemanager.containerregistry.generated.fluent.RegistriesClient.update":"Microsoft.ContainerRegistry.Registries.update","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient":"Microsoft.ContainerRegistry.Replications","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginCreate":"Microsoft.ContainerRegistry.Replications.create","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginDelete":"Microsoft.ContainerRegistry.Replications.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.beginUpdate":"Microsoft.ContainerRegistry.Replications.update","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.create":"Microsoft.ContainerRegistry.Replications.create","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.delete":"Microsoft.ContainerRegistry.Replications.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.get":"Microsoft.ContainerRegistry.Replications.get","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.getWithResponse":"Microsoft.ContainerRegistry.Replications.get","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.list":"Microsoft.ContainerRegistry.Replications.list","com.azure.resourcemanager.containerregistry.generated.fluent.ReplicationsClient.update":"Microsoft.ContainerRegistry.Replications.update","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient":"Microsoft.ContainerRegistry.ScopeMaps","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginCreate":"Microsoft.ContainerRegistry.ScopeMaps.create","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginDelete":"Microsoft.ContainerRegistry.ScopeMaps.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.beginUpdate":"Microsoft.ContainerRegistry.ScopeMaps.update","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.create":"Microsoft.ContainerRegistry.ScopeMaps.create","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.delete":"Microsoft.ContainerRegistry.ScopeMaps.delete","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.get":"Microsoft.ContainerRegistry.ScopeMaps.get","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.getWithResponse":"Microsoft.ContainerRegistry.ScopeMaps.get","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.list":"Microsoft.ContainerRegistry.ScopeMaps.list","com.azure.resourcemanager.containerregistry.generated.fluent.ScopeMapsClient.update":"Microsoft.ContainerRegistry.ScopeMaps.update","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient":"Microsoft.ContainerRegistry.Tokens","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginCreate":"Microsoft.ContainerRegistry.Tokens.create","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginDelete":"Microsoft.ContainerRegistry.Tokens.delete","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.beginUpdate":"Microsoft.ContainerRegistry.Tokens.update","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.create":"Microsoft.ContainerRegistry.Tokens.create","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.delete":"Microsoft.ContainerRegistry.Tokens.delete","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.get":"Microsoft.ContainerRegistry.Tokens.get","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.getWithResponse":"Microsoft.ContainerRegistry.Tokens.get","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.list":"Microsoft.ContainerRegistry.Tokens.list","com.azure.resourcemanager.containerregistry.generated.fluent.TokensClient.update":"Microsoft.ContainerRegistry.Tokens.update","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient":"Microsoft.ContainerRegistry.Webhooks","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginCreate":"Microsoft.ContainerRegistry.Webhooks.create","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginDelete":"Microsoft.ContainerRegistry.Webhooks.delete","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.beginUpdate":"Microsoft.ContainerRegistry.Webhooks.update","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.create":"Microsoft.ContainerRegistry.Webhooks.create","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.delete":"Microsoft.ContainerRegistry.Webhooks.delete","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.get":"Microsoft.ContainerRegistry.Webhooks.get","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfig":"Microsoft.ContainerRegistry.Webhooks.getCallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getCallbackConfigWithResponse":"Microsoft.ContainerRegistry.Webhooks.getCallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.getWithResponse":"Microsoft.ContainerRegistry.Webhooks.get","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.list":"Microsoft.ContainerRegistry.Webhooks.list","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.listEvents":"Microsoft.ContainerRegistry.Webhooks.listEvents","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.ping":"Microsoft.ContainerRegistry.Webhooks.ping","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.pingWithResponse":"Microsoft.ContainerRegistry.Webhooks.ping","com.azure.resourcemanager.containerregistry.generated.fluent.WebhooksClient.update":"Microsoft.ContainerRegistry.Webhooks.update","com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleInner":"Microsoft.ContainerRegistry.CacheRule","com.azure.resourcemanager.containerregistry.generated.fluent.models.CacheRuleUpdateProperties":"Microsoft.ContainerRegistry.CacheRuleUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner":"Microsoft.ContainerRegistry.CallbackConfig","com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryInner":"Microsoft.ContainerRegistry.ConnectedRegistry","com.azure.resourcemanager.containerregistry.generated.fluent.models.ConnectedRegistryUpdateProperties":"Microsoft.ContainerRegistry.ConnectedRegistryUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetInner":"Microsoft.ContainerRegistry.CredentialSet","com.azure.resourcemanager.containerregistry.generated.fluent.models.CredentialSetUpdateProperties":"Microsoft.ContainerRegistry.CredentialSetUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner":"Microsoft.ContainerRegistry.EventInfo","com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInner":"Microsoft.ContainerRegistry.Event","com.azure.resourcemanager.containerregistry.generated.fluent.models.GenerateCredentialsResultInner":"Microsoft.ContainerRegistry.GenerateCredentialsResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner":"Microsoft.ContainerRegistry.OperationDefinition","com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition":"Microsoft.ContainerRegistry.OperationPropertiesDefinition","com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner":"Microsoft.ContainerRegistry.PrivateEndpointConnection","com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner":"Azure.ResourceManager.CommonTypes.PrivateLinkResource","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryInner":"Microsoft.ContainerRegistry.Registry","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryListCredentialsResultInner":"Microsoft.ContainerRegistry.RegistryListCredentialsResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner":"Microsoft.ContainerRegistry.RegistryNameStatus","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryPropertiesUpdateParameters":"Microsoft.ContainerRegistry.RegistryPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner":"Microsoft.ContainerRegistry.RegistryUsageListResult","com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner":"Microsoft.ContainerRegistry.Replication","com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties":"Microsoft.ContainerRegistry.ReplicationUpdateParametersProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner":"Microsoft.ContainerRegistry.ScopeMap","com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters":"Microsoft.ContainerRegistry.ScopeMapPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenInner":"Microsoft.ContainerRegistry.Token","com.azure.resourcemanager.containerregistry.generated.fluent.models.TokenUpdateProperties":"Microsoft.ContainerRegistry.TokenUpdateProperties","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner":"Microsoft.ContainerRegistry.Webhook","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters":"Microsoft.ContainerRegistry.WebhookPropertiesCreateParameters","com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters":"Microsoft.ContainerRegistry.WebhookPropertiesUpdateParameters","com.azure.resourcemanager.containerregistry.generated.implementation.ContainerRegistryManagementClientBuilder":"Microsoft.ContainerRegistry","com.azure.resourcemanager.containerregistry.generated.implementation.models.CacheRulesListResult":"Microsoft.ContainerRegistry.CacheRulesListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ConnectedRegistryListResult":"Microsoft.ContainerRegistry.ConnectedRegistryListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.CredentialSetListResult":"Microsoft.ContainerRegistry.CredentialSetListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.EventListResult":"Microsoft.ContainerRegistry.EventListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult":"Microsoft.ContainerRegistry.OperationListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.ContainerRegistry.PrivateEndpointConnectionListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult":"Microsoft.ContainerRegistry.PrivateLinkResourceListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.RegistryListResult":"Microsoft.ContainerRegistry.RegistryListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult":"Microsoft.ContainerRegistry.ReplicationListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult":"Microsoft.ContainerRegistry.ScopeMapListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.TokenListResult":"Microsoft.ContainerRegistry.TokenListResult","com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult":"Microsoft.ContainerRegistry.WebhookListResult","com.azure.resourcemanager.containerregistry.generated.models.Action":"Microsoft.ContainerRegistry.Action","com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired":"Microsoft.ContainerRegistry.ActionsRequired","com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties":"Microsoft.ContainerRegistry.ActivationProperties","com.azure.resourcemanager.containerregistry.generated.models.ActivationStatus":"Microsoft.ContainerRegistry.ActivationStatus","com.azure.resourcemanager.containerregistry.generated.models.Actor":"Microsoft.ContainerRegistry.Actor","com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus":"Microsoft.ContainerRegistry.AuditLogStatus","com.azure.resourcemanager.containerregistry.generated.models.AuthCredential":"Microsoft.ContainerRegistry.AuthCredential","com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy":"Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicy","com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus":"Microsoft.ContainerRegistry.AzureADAuthenticationAsArmPolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties":"Microsoft.ContainerRegistry.CacheRuleProperties","com.azure.resourcemanager.containerregistry.generated.models.CacheRuleUpdateParameters":"Microsoft.ContainerRegistry.CacheRuleUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.CertificateType":"Microsoft.ContainerRegistry.CertificateType","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode":"Microsoft.ContainerRegistry.ConnectedRegistryMode","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties":"Microsoft.ContainerRegistry.ConnectedRegistryProperties","com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryUpdateParameters":"Microsoft.ContainerRegistry.ConnectedRegistryUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.ConnectionState":"Microsoft.ContainerRegistry.ConnectionState","com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus":"Microsoft.ContainerRegistry.ConnectionStatus","com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType":"Microsoft.ContainerRegistry.ContainerRegistryResourceType","com.azure.resourcemanager.containerregistry.generated.models.CredentialHealth":"Microsoft.ContainerRegistry.CredentialHealth","com.azure.resourcemanager.containerregistry.generated.models.CredentialHealthStatus":"Microsoft.ContainerRegistry.CredentialHealthStatus","com.azure.resourcemanager.containerregistry.generated.models.CredentialName":"Microsoft.ContainerRegistry.CredentialName","com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties":"Microsoft.ContainerRegistry.CredentialSetProperties","com.azure.resourcemanager.containerregistry.generated.models.CredentialSetUpdateParameters":"Microsoft.ContainerRegistry.CredentialSetUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.DefaultAction":"Microsoft.ContainerRegistry.DefaultAction","com.azure.resourcemanager.containerregistry.generated.models.EncryptionProperty":"Microsoft.ContainerRegistry.EncryptionProperty","com.azure.resourcemanager.containerregistry.generated.models.EncryptionStatus":"Microsoft.ContainerRegistry.EncryptionStatus","com.azure.resourcemanager.containerregistry.generated.models.EventContent":"Microsoft.ContainerRegistry.EventContent","com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage":"Microsoft.ContainerRegistry.EventRequestMessage","com.azure.resourcemanager.containerregistry.generated.models.EventResponseMessage":"Microsoft.ContainerRegistry.EventResponseMessage","com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy":"Microsoft.ContainerRegistry.ExportPolicy","com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus":"Microsoft.ContainerRegistry.ExportPolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties":"Microsoft.ContainerRegistry.GarbageCollectionProperties","com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters":"Microsoft.ContainerRegistry.GenerateCredentialsParameters","com.azure.resourcemanager.containerregistry.generated.models.IPRule":"Microsoft.ContainerRegistry.IPRule","com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties":"Microsoft.ContainerRegistry.IdentityProperties","com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters":"Microsoft.ContainerRegistry.ImportImageParameters","com.azure.resourcemanager.containerregistry.generated.models.ImportMode":"Microsoft.ContainerRegistry.ImportMode","com.azure.resourcemanager.containerregistry.generated.models.ImportSource":"Microsoft.ContainerRegistry.ImportSource","com.azure.resourcemanager.containerregistry.generated.models.ImportSourceCredentials":"Microsoft.ContainerRegistry.ImportSourceCredentials","com.azure.resourcemanager.containerregistry.generated.models.KeyVaultProperties":"Microsoft.ContainerRegistry.KeyVaultProperties","com.azure.resourcemanager.containerregistry.generated.models.LogLevel":"Microsoft.ContainerRegistry.LogLevel","com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties":"Microsoft.ContainerRegistry.LoggingProperties","com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties":"Microsoft.ContainerRegistry.LoginServerProperties","com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleBypassOptions":"Microsoft.ContainerRegistry.NetworkRuleBypassOptions","com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet":"Microsoft.ContainerRegistry.NetworkRuleSet","com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition":"Microsoft.ContainerRegistry.OperationDisplayDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition":"Microsoft.ContainerRegistry.OperationLogSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition":"Microsoft.ContainerRegistry.OperationMetricSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition":"Microsoft.ContainerRegistry.OperationServiceSpecificationDefinition","com.azure.resourcemanager.containerregistry.generated.models.ParentProperties":"Microsoft.ContainerRegistry.ParentProperties","com.azure.resourcemanager.containerregistry.generated.models.PasswordName":"Microsoft.ContainerRegistry.PasswordName","com.azure.resourcemanager.containerregistry.generated.models.Policies":"Microsoft.ContainerRegistry.Policies","com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus":"Microsoft.ContainerRegistry.PolicyStatus","com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint":"Microsoft.ContainerRegistry.PrivateEndpoint","com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties":"Microsoft.ContainerRegistry.PrivateEndpointConnectionProperties","com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties":"Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties","com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState":"Microsoft.ContainerRegistry.PrivateLinkServiceConnectionState","com.azure.resourcemanager.containerregistry.generated.models.ProvisioningState":"Microsoft.ContainerRegistry.ProvisioningState","com.azure.resourcemanager.containerregistry.generated.models.PublicNetworkAccess":"Microsoft.ContainerRegistry.PublicNetworkAccess","com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy":"Microsoft.ContainerRegistry.QuarantinePolicy","com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters":"Microsoft.ContainerRegistry.RegenerateCredentialParameters","com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest":"Microsoft.ContainerRegistry.RegistryNameCheckRequest","com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword":"Microsoft.ContainerRegistry.RegistryPassword","com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties":"Microsoft.ContainerRegistry.RegistryProperties","com.azure.resourcemanager.containerregistry.generated.models.RegistryUpdateParameters":"Microsoft.ContainerRegistry.RegistryUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage":"Microsoft.ContainerRegistry.RegistryUsage","com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit":"Microsoft.ContainerRegistry.RegistryUsageUnit","com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties":"Microsoft.ContainerRegistry.ReplicationProperties","com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters":"Microsoft.ContainerRegistry.ReplicationUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.Request":"Microsoft.ContainerRegistry.Request","com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType":"Microsoft.ContainerRegistry.ResourceIdentityType","com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy":"Microsoft.ContainerRegistry.RetentionPolicy","com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode":"Microsoft.ContainerRegistry.RoleAssignmentMode","com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties":"Microsoft.ContainerRegistry.ScopeMapProperties","com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters":"Microsoft.ContainerRegistry.ScopeMapUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.Sku":"Microsoft.ContainerRegistry.Sku","com.azure.resourcemanager.containerregistry.generated.models.SkuName":"Microsoft.ContainerRegistry.SkuName","com.azure.resourcemanager.containerregistry.generated.models.SkuTier":"Microsoft.ContainerRegistry.SkuTier","com.azure.resourcemanager.containerregistry.generated.models.Source":"Microsoft.ContainerRegistry.Source","com.azure.resourcemanager.containerregistry.generated.models.Status":"Microsoft.ContainerRegistry.Status","com.azure.resourcemanager.containerregistry.generated.models.StatusDetailProperties":"Microsoft.ContainerRegistry.StatusDetailProperties","com.azure.resourcemanager.containerregistry.generated.models.SyncProperties":"Microsoft.ContainerRegistry.SyncProperties","com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties":"Microsoft.ContainerRegistry.SyncUpdateProperties","com.azure.resourcemanager.containerregistry.generated.models.Target":"Microsoft.ContainerRegistry.Target","com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties":"Microsoft.ContainerRegistry.TlsCertificateProperties","com.azure.resourcemanager.containerregistry.generated.models.TlsProperties":"Microsoft.ContainerRegistry.TlsProperties","com.azure.resourcemanager.containerregistry.generated.models.TlsStatus":"Microsoft.ContainerRegistry.TlsStatus","com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate":"Microsoft.ContainerRegistry.TokenCertificate","com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName":"Microsoft.ContainerRegistry.TokenCertificateName","com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties":"Microsoft.ContainerRegistry.TokenCredentialsProperties","com.azure.resourcemanager.containerregistry.generated.models.TokenPassword":"Microsoft.ContainerRegistry.TokenPassword","com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName":"Microsoft.ContainerRegistry.TokenPasswordName","com.azure.resourcemanager.containerregistry.generated.models.TokenProperties":"Microsoft.ContainerRegistry.TokenProperties","com.azure.resourcemanager.containerregistry.generated.models.TokenStatus":"Microsoft.ContainerRegistry.TokenStatus","com.azure.resourcemanager.containerregistry.generated.models.TokenUpdateParameters":"Microsoft.ContainerRegistry.TokenUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy":"Microsoft.ContainerRegistry.TrustPolicy","com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType":"Microsoft.ContainerRegistry.TrustPolicyType","com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties":"Microsoft.ContainerRegistry.UserIdentityProperties","com.azure.resourcemanager.containerregistry.generated.models.WebhookAction":"Microsoft.ContainerRegistry.WebhookAction","com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters":"Microsoft.ContainerRegistry.WebhookCreateParameters","com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties":"Microsoft.ContainerRegistry.WebhookProperties","com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus":"Microsoft.ContainerRegistry.WebhookStatus","com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters":"Microsoft.ContainerRegistry.WebhookUpdateParameters","com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy":"Microsoft.ContainerRegistry.ZoneRedundancy"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/generated/ContainerRegistryManager.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CacheRulesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ConnectedRegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ContainerRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/CredentialSetsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ReplicationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/ScopeMapsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/TokensClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/WebhooksClient.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CacheRuleUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CallbackConfigInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ConnectedRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/CredentialSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInfoInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/EventInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/OperationPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryListCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryNameStatusInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/RegistryUsageListResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ReplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/ScopeMapPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/TokenUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookInner.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/WebhookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRuleImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CacheRulesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CallbackConfigImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistriesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ConnectedRegistryImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ContainerRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/CredentialSetsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/EventInfoImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/GenerateCredentialsResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationDefinitionImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistriesImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryListCredentialsResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryNameStatusImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/RegistryUsageListResultImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ReplicationsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/ScopeMapsImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokenImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/TokensImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhookImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/WebhooksImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CacheRulesListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ConnectedRegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/CredentialSetListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/EventListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/RegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ReplicationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/ScopeMapListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/TokenListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/models/WebhookListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/implementation/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Action.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActionsRequired.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ActivationStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Actor.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuditLogStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AuthCredential.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/AzureADAuthenticationAsArmPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRule.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CacheRules.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CallbackConfig.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CertificateType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistries.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistry.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectedRegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ContainerRegistryResourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealth.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialHealthStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSet.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSetUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/CredentialSets.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Event.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventContent.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventInfo.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventRequestMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/EventResponseMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ExportPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GarbageCollectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/GenerateCredentialsResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IPRule.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportImageParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSource.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ImportSourceCredentials.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LogLevel.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoggingProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/LoginServerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleBypassOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationDisplayDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationLogSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationMetricSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/OperationServiceSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Operations.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ParentProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Policies.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/QuarantinePolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegenerateCredentialParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registries.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Registry.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryListCredentialsResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameCheckRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryNameStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsage.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RegistryUsageUnit.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replication.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ReplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Replications.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Request.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/RoleAssignmentMode.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMap.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMapUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ScopeMaps.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Sku.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SkuTier.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Source.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Status.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/StatusDetailProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/SyncUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Target.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsCertificateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TlsStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Token.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificate.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCertificateName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenCredentialsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenPasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TokenUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Tokens.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/TrustPolicyType.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhook.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookAction.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/WebhookUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/Webhooks.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/ZoneRedundancy.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/generated/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json deleted file mode 100644 index 03b3e11e4a4e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.containerregistry.generated.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.generated.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.generated.implementation.WebhooksClientImpl$WebhooksService"]] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry-generated/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/main/resources/azure-resourcemanager-containerregistry-generated.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java deleted file mode 100644 index de278b166e0b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesCreateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.CacheRuleProperties; - -/** - * Samples for CacheRules Create. - */ -public final class CacheRulesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleCreate.json - */ - /** - * Sample code: CacheRuleCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules() - .define("myCacheRule") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new CacheRuleProperties().withCredentialSetResourceId("fakeTokenPlaceholder") - .withSourceRepository("docker.io/library/hello-world") - .withTargetRepository("cached-docker-hub/hello-world")) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java deleted file mode 100644 index c3f3117179fa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CacheRules Delete. - */ -public final class CacheRulesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleDelete.json - */ - /** - * Sample code: CacheRuleDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules().delete("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java deleted file mode 100644 index 4ad07878575f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CacheRules Get. - */ -public final class CacheRulesGetSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleGet.json - */ - /** - * Sample code: CacheRuleGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules() - .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java deleted file mode 100644 index aa80d4c5f14f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CacheRules List. - */ -public final class CacheRulesListSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleList.json - */ - /** - * Sample code: CacheRuleList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.cacheRules().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java deleted file mode 100644 index 7eac0ddbb2eb..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CacheRulesUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.CacheRule; - -/** - * Samples for CacheRules Update. - */ -public final class CacheRulesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json - */ - /** - * Sample code: CacheRuleUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - cacheRuleUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - CacheRule resource = manager.cacheRules() - .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withCredentialSetResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2") - .apply(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java deleted file mode 100644 index ce5953c622d7..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesCreateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryMode; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ParentProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncProperties; -import java.time.Duration; -import java.util.Arrays; - -/** - * Samples for ConnectedRegistries Create. - */ -public final class ConnectedRegistriesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json - */ - /** - * Sample code: ConnectedRegistryCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryCreate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .define("myConnectedRegistry") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new ConnectedRegistryProperties().withMode(ConnectedRegistryMode.READ_WRITE) - .withParent( - new ParentProperties().withSyncProperties(new SyncProperties().withTokenId("fakeTokenPlaceholder") - .withSchedule("0 9 * * *") - .withSyncWindow(Duration.parse("PT3H")) - .withMessageTtl(Duration.parse("P2D")))) - .withClientTokenIds(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token")) - .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) - .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *"))) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java deleted file mode 100644 index 498a336e15c5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ConnectedRegistries Deactivate. - */ -public final class ConnectedRegistriesDeactivateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json - */ - /** - * Sample code: ConnectedRegistryDeactivate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryDeactivate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .deactivate("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java deleted file mode 100644 index 2e256d4ec28f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ConnectedRegistries Delete. - */ -public final class ConnectedRegistriesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json - */ - /** - * Sample code: ConnectedRegistryDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryDelete( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .delete("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java deleted file mode 100644 index 11019ab0146f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ConnectedRegistries Get. - */ -public final class ConnectedRegistriesGetSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json - */ - /** - * Sample code: ConnectedRegistryGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - connectedRegistryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries() - .getWithResponse("myResourceGroup", "myRegistry", "myConnectedRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java deleted file mode 100644 index a66a7873ff85..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ConnectedRegistries List. - */ -public final class ConnectedRegistriesListSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json - */ - /** - * Sample code: ConnectedRegistryList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - connectedRegistryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.connectedRegistries().list("myResourceGroup", "myRegistry", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java deleted file mode 100644 index f87c6b260db5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectedRegistry; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; -import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; -import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; -import java.time.Duration; -import java.util.Arrays; - -/** - * Samples for ConnectedRegistries Update. - */ -public final class ConnectedRegistriesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json - */ - /** - * Sample code: ConnectedRegistryUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void connectedRegistryUpdate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - ConnectedRegistry resource = manager.connectedRegistries() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withSyncProperties(new SyncUpdateProperties().withSchedule("0 0 */10 * *") - .withSyncWindow(Duration.parse("P2D")) - .withMessageTtl(Duration.parse("P30D"))) - .withLogging( - new LoggingProperties().withLogLevel(LogLevel.DEBUG).withAuditLogStatus(AuditLogStatus.ENABLED)) - .withClientTokenIds(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token")) - .withNotificationsList(Arrays.asList("hello-world:*:*", "sample/repo/*:1.0:*")) - .withGarbageCollection(new GarbageCollectionProperties().withEnabled(true).withSchedule("0 5 * * *")) - .apply(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java deleted file mode 100644 index a5b2720d0841..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsCreateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSetProperties; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; -import java.util.Arrays; - -/** - * Samples for CredentialSets Create. - */ -public final class CredentialSetsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetCreate.json - */ - /** - * Sample code: CredentialSetCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .define("myCredentialSet") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new CredentialSetProperties().withLoginServer("docker.io") - .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) - .withUsernameSecretIdentifier("fakeTokenPlaceholder") - .withPasswordSecretIdentifier("fakeTokenPlaceholder")))) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java deleted file mode 100644 index dcf22fd0aea6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CredentialSets Delete. - */ -public final class CredentialSetsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetDelete.json - */ - /** - * Sample code: CredentialSetDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .delete("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java deleted file mode 100644 index 90327dac1270..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CredentialSets Get. - */ -public final class CredentialSetsGetSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetGet.json - */ - /** - * Sample code: CredentialSetGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets() - .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java deleted file mode 100644 index 90656f2a1d36..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for CredentialSets List. - */ -public final class CredentialSetsListSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetList.json - */ - /** - * Sample code: CredentialSetList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.credentialSets().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java deleted file mode 100644 index 096907625f68..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/CredentialSetsUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.AuthCredential; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialName; -import com.azure.resourcemanager.containerregistry.generated.models.CredentialSet; -import java.util.Arrays; - -/** - * Samples for CredentialSets Update. - */ -public final class CredentialSetsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json - */ - /** - * Sample code: CredentialSetUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - credentialSetUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - CredentialSet resource = manager.credentialSets() - .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withAuthCredentials(Arrays.asList(new AuthCredential().withName(CredentialName.CREDENTIAL1) - .withUsernameSecretIdentifier("fakeTokenPlaceholder") - .withPasswordSecretIdentifier("fakeTokenPlaceholder"))) - .apply(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java deleted file mode 100644 index dfdbbbb7bf29..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-11-01/OperationList.json - */ - /** - * Sample code: OperationList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - operationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 6bbdf175712d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; - -/** - * Samples for PrivateEndpointConnections CreateOrUpdate. - */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json - */ - /** - * Sample code: PrivateEndpointConnectionCreateOrUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionCreateOrUpdate( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .define("myConnection") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("Auto-Approved"))) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index b0c67110c18f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for PrivateEndpointConnections Delete. - */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json - */ - /** - * Sample code: PrivateEndpointConnectionDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionDelete( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .delete("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index 3d3b19c5465a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for PrivateEndpointConnections Get. - */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json - */ - /** - * Sample code: PrivateEndpointConnectionGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionGet( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections() - .getWithResponse("myResourceGroup", "myRegistry", "myConnection", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index 484a4b188bb6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for PrivateEndpointConnections List. - */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json - */ - /** - * Sample code: PrivateEndpointConnectionList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void privateEndpointConnectionList( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.privateEndpointConnections().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java deleted file mode 100644 index 7fae73cd7178..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; - -/** - * Samples for Registries CheckNameAvailability. - */ -public final class RegistriesCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json - */ - /** - * Sample code: RegistryCheckNameAvailable. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCheckNameAvailable( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json - */ - /** - * Sample code: RegistryCheckNameNotAvailable. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCheckNameNotAvailable( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java deleted file mode 100644 index 7f293b5e353f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCreateSamples.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.RegistryProperties; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import com.azure.resourcemanager.containerregistry.generated.models.SkuName; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries Create. - */ -public final class RegistriesCreateSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json - */ - /** - * Sample code: RegistryCreateAbac. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryCreateAbac(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties( - new RegistryProperties().withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS)) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json - */ - /** - * Sample code: RegistryCreateZoneRedundant. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryCreateZoneRedundant( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new RegistryProperties().withZoneRedundancy(ZoneRedundancy.ENABLED)) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/RegistryCreate.json - */ - /** - * Sample code: RegistryCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .define("myRegistry") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName(SkuName.STANDARD)) - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new RegistryProperties().withAdminUserEnabled(true)) - .create(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java deleted file mode 100644 index caca2a1916c9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries Delete. - */ -public final class RegistriesDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryDelete.json - */ - /** - * Sample code: RegistryDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().delete("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java deleted file mode 100644 index f459b555511f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGenerateCredentialsSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.GenerateCredentialsParameters; -import java.time.OffsetDateTime; - -/** - * Samples for Registries GenerateCredentials. - */ -public final class RegistriesGenerateCredentialsSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json - */ - /** - * Sample code: RegistryGenerateCredentials. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryGenerateCredentials( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .generateCredentials("myResourceGroup", "myRegistry", - new GenerateCredentialsParameters().withTokenId("fakeTokenPlaceholder") - .withExpiry(OffsetDateTime.parse("2020-12-31T15:59:59.0707808Z")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java deleted file mode 100644 index fcafb15b915c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries GetByResourceGroup. - */ -public final class RegistriesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGet.json - */ - /** - * Sample code: RegistryGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java deleted file mode 100644 index 1c00e21c4abe..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries GetPrivateLinkResource. - */ -public final class RegistriesGetPrivateLinkResourceSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json - */ - /** - * Sample code: RegistryGetPrivateLinkResource. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryGetPrivateLinkResource( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .getPrivateLinkResourceWithResponse("myResourceGroup", "myRegistry", "registry", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java deleted file mode 100644 index 7772a637faf6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesImportImageSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.generated.models.ImportMode; -import com.azure.resourcemanager.containerregistry.generated.models.ImportSource; -import java.util.Arrays; - -/** - * Samples for Registries ImportImage. - */ -public final class RegistriesImportImageSamples { - /* - * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json - */ - /** - * Sample code: ImportImageFromPublicRegistry. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void importImageFromPublicRegistry( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters() - .withSource(new ImportSource().withRegistryUri("registry.hub.docker.com") - .withSourceImage("library/hello-world")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/ImportImageByTag.json - */ - /** - * Sample code: ImportImageByTag. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - importImageByTag(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters().withSource(new ImportSource().withResourceId( - "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") - .withSourceImage("sourceRepository:sourceTag")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json - */ - /** - * Sample code: ImportImageByManifestDigest. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void importImageByManifestDigest( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .importImage("myResourceGroup", "myRegistry", - new ImportImageParameters().withSource(new ImportSource().withResourceId( - "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry") - .withSourceImage( - "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000")) - .withTargetTags(Arrays.asList("targetRepository:targetTag")) - .withUntaggedTargetRepositories(Arrays.asList("targetRepository1")) - .withMode(ImportMode.FORCE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java deleted file mode 100644 index 8c907f1aa279..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries ListByResourceGroup. - */ -public final class RegistriesListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json - */ - /** - * Sample code: RegistryListByResourceGroup. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListByResourceGroup( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java deleted file mode 100644 index fe2dbfca4158..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListCredentialsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries ListCredentials. - */ -public final class RegistriesListCredentialsSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListCredentials.json - */ - /** - * Sample code: RegistryListCredentials. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListCredentials( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .listCredentialsWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java deleted file mode 100644 index 489bbb6cff04..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries ListPrivateLinkResources. - */ -public final class RegistriesListPrivateLinkResourcesSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json - */ - /** - * Sample code: RegistryListPrivateLinkResources. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryListPrivateLinkResources( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .listPrivateLinkResources("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java deleted file mode 100644 index 50a6b3d3def4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries List. - */ -public final class RegistriesListSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryList.json - */ - /** - * Sample code: RegistryList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java deleted file mode 100644 index e8945ff9f4ca..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Registries ListUsages. - */ -public final class RegistriesListUsagesSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryListUsages.json - */ - /** - * Sample code: RegistryListUsages. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryListUsages(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries().listUsagesWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java deleted file mode 100644 index c5f4efea19a5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesRegenerateCredentialSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; - -/** - * Samples for Registries RegenerateCredential. - */ -public final class RegistriesRegenerateCredentialSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json - */ - /** - * Sample code: RegistryRegenerateCredential. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void registryRegenerateCredential( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.registries() - .regenerateCredentialWithResponse("myResourceGroup", "myRegistry", - new RegenerateCredentialParameters().withName(PasswordName.PASSWORD), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java deleted file mode 100644 index 24422bfc6809..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.Registry; -import com.azure.resourcemanager.containerregistry.generated.models.RoleAssignmentMode; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import com.azure.resourcemanager.containerregistry.generated.models.SkuName; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries Update. - */ -public final class RegistriesUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/RegistryUpdate.json - */ - /** - * Sample code: RegistryUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - registryUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withSku(new Sku().withName(SkuName.STANDARD)) - .withAdminUserEnabled(true) - .withRoleAssignmentMode(RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS) - .apply(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java deleted file mode 100644 index 1eadb0b28b49..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateSamples.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Replications Create. - */ -public final class ReplicationsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationCreate.json - */ - /** - * Sample code: ReplicationCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .define("myReplication") - .withRegion("eastus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .create(); - } - - /* - * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json - */ - /** - * Sample code: ReplicationCreateZoneRedundant. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void replicationCreateZoneRedundant( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .define("myReplication") - .withRegion("eastus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties( - new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) - .create(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java deleted file mode 100644 index 7734bb501890..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Replications Delete. - */ -public final class ReplicationsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationDelete.json - */ - /** - * Sample code: ReplicationDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .delete("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java deleted file mode 100644 index 389b8be593ae..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Replications Get. - */ -public final class ReplicationsGetSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationGet.json - */ - /** - * Sample code: ReplicationGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications() - .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java deleted file mode 100644 index 45b8ed0ff816..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Replications List. - */ -public final class ReplicationsListSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationList.json - */ - /** - * Sample code: ReplicationList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.replications().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java deleted file mode 100644 index ec2a6e85c2c8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Replications Update. - */ -public final class ReplicationsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ReplicationUpdate.json - */ - /** - * Sample code: ReplicationUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - replicationUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Replication resource = manager.replications() - .getWithResponse("myResourceGroup", "myRegistry", "myReplication", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java deleted file mode 100644 index 84e880e3698d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.util.Arrays; - -/** - * Samples for ScopeMaps Create. - */ -public final class ScopeMapsCreateSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapCreate.json - */ - /** - * Sample code: ScopeMapCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps() - .define("myScopeMap") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new ScopeMapProperties().withDescription("Developer Scopes") - .withActions( - Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/delete"))) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java deleted file mode 100644 index 01295295e845..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ScopeMaps Delete. - */ -public final class ScopeMapsDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapDelete.json - */ - /** - * Sample code: ScopeMapDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps().delete("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java deleted file mode 100644 index 470062b94920..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ScopeMaps Get. - */ -public final class ScopeMapsGetSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapGet.json - */ - /** - * Sample code: ScopeMapGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java deleted file mode 100644 index 51e9550c7bfd..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for ScopeMaps List. - */ -public final class ScopeMapsListSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapList.json - */ - /** - * Sample code: ScopeMapList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.scopeMaps().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java deleted file mode 100644 index 7ba162092ae5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsUpdateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import java.util.Arrays; - -/** - * Samples for ScopeMaps Update. - */ -public final class ScopeMapsUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json - */ - /** - * Sample code: ScopeMapUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - scopeMapUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - ScopeMap resource = manager.scopeMaps() - .getWithResponse("myResourceGroup", "myRegistry", "myScopeMap", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDescription("Developer Scopes") - .withActions( - Arrays.asList("repositories/myrepository/contentWrite", "repositories/myrepository/contentRead")) - .apply(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java deleted file mode 100644 index 7f0335309725..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensCreateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenProperties; -import com.azure.resourcemanager.containerregistry.generated.models.TokenStatus; -import java.util.Arrays; - -/** - * Samples for Tokens Create. - */ -public final class TokensCreateSamples { - /* - * x-ms-original-file: 2025-11-01/TokenCreate.json - */ - /** - * Sample code: TokenCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens() - .define("myToken") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withProperties(new TokenProperties().withScopeMapId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap") - .withCredentials(new TokenCredentialsProperties() - .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) - .withEncodedPemCertificate("fakeTokenPlaceholder")))) - .withStatus(TokenStatus.DISABLED)) - .create(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java deleted file mode 100644 index f8e37ade9447..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Tokens Delete. - */ -public final class TokensDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/TokenDelete.json - */ - /** - * Sample code: TokenDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().delete("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java deleted file mode 100644 index ad680a84d633..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Tokens Get. - */ -public final class TokensGetSamples { - /* - * x-ms-original-file: 2025-11-01/TokenGet.json - */ - /** - * Sample code: TokenGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java deleted file mode 100644 index 670b4742ae1d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Tokens List. - */ -public final class TokensListSamples { - /* - * x-ms-original-file: 2025-11-01/TokenList.json - */ - /** - * Sample code: TokenList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.tokens().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java deleted file mode 100644 index db52d44a2a3e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.Token; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificate; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCertificateName; -import com.azure.resourcemanager.containerregistry.generated.models.TokenCredentialsProperties; -import java.util.Arrays; - -/** - * Samples for Tokens Update. - */ -public final class TokensUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/TokenUpdate.json - */ - /** - * Sample code: TokenUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - tokenUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Token resource = manager.tokens() - .getWithResponse("myResourceGroup", "myRegistry", "myToken", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withScopeMapId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap") - .withCredentials(new TokenCredentialsProperties() - .withCertificates(Arrays.asList(new TokenCertificate().withName(TokenCertificateName.CERTIFICATE1) - .withEncodedPemCertificate("fakeTokenPlaceholder")))) - .apply(); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java deleted file mode 100644 index 3b889068f64c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Webhooks Create. - */ -public final class WebhooksCreateSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookCreate.json - */ - /** - * Sample code: WebhookCreate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookCreate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .define("myWebhook") - .withRegion("westus") - .withExistingRegistry("myResourceGroup", "myRegistry") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withServiceUri("http://myservice.com") - .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) - .withStatus(WebhookStatus.ENABLED) - .withScope("myRepository") - .withActions(Arrays.asList(WebhookAction.PUSH)) - .create(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java deleted file mode 100644 index 6a1c8f4dae2a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks Delete. - */ -public final class WebhooksDeleteSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookDelete.json - */ - /** - * Sample code: WebhookDelete. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookDelete(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().delete("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java deleted file mode 100644 index a652f9fa365d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks GetCallbackConfig. - */ -public final class WebhooksGetCallbackConfigSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json - */ - /** - * Sample code: WebhookGetCallbackConfig. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void webhookGetCallbackConfig( - com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .getCallbackConfigWithResponse("myResourceGroup", "myRegistry", "myWebhook", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java deleted file mode 100644 index 8ce40f363b73..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks Get. - */ -public final class WebhooksGetSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookGet.json - */ - /** - * Sample code: WebhookGet. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookGet(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java deleted file mode 100644 index 2618e5d3296b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListEventsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks ListEvents. - */ -public final class WebhooksListEventsSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookListEvents.json - */ - /** - * Sample code: WebhookListEvents. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookListEvents(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().listEvents("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java deleted file mode 100644 index 017d34aa6546..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks List. - */ -public final class WebhooksListSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookList.json - */ - /** - * Sample code: WebhookList. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookList(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks().list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java deleted file mode 100644 index 0cea600e0963..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -/** - * Samples for Webhooks Ping. - */ -public final class WebhooksPingSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookPing.json - */ - /** - * Sample code: WebhookPing. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookPing(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - manager.webhooks() - .pingWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java deleted file mode 100644 index fcbc62eb22df..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/samples/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Webhooks Update. - */ -public final class WebhooksUpdateSamples { - /* - * x-ms-original-file: 2025-11-01/WebhookUpdate.json - */ - /** - * Sample code: WebhookUpdate. - * - * @param manager Entry point to ContainerRegistryManager. - */ - public static void - webhookUpdate(com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager manager) { - Webhook resource = manager.webhooks() - .getWithResponse("myResourceGroup", "myRegistry", "myWebhook", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withServiceUri("http://myservice.com") - .withCustomHeaders(mapOf("Authorization", "fakeTokenPlaceholder")) - .withStatus(WebhookStatus.ENABLED) - .withScope("myRepository") - .withActions(Arrays.asList(WebhookAction.PUSH)) - .apply(); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java deleted file mode 100644 index b80ebd8455e1..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActivationPropertiesTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ActivationProperties; - -public final class ActivationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActivationProperties model - = BinaryData.fromString("{\"status\":\"Active\"}").toObject(ActivationProperties.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java deleted file mode 100644 index dfd497212709..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ActorTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Actor; -import org.junit.jupiter.api.Assertions; - -public final class ActorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Actor model = BinaryData.fromString("{\"name\":\"minrfdw\"}").toObject(Actor.class); - Assertions.assertEquals("minrfdw", model.name()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java deleted file mode 100644 index 8ac219255889..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/AzureADAuthenticationAsArmPolicyTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus; -import org.junit.jupiter.api.Assertions; - -public final class AzureADAuthenticationAsArmPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADAuthenticationAsArmPolicy model - = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(AzureADAuthenticationAsArmPolicy.class); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADAuthenticationAsArmPolicy model - = new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(AzureADAuthenticationAsArmPolicy.class); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java deleted file mode 100644 index f828e870d92a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/CallbackConfigInnerTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.CallbackConfigInner; -import org.junit.jupiter.api.Assertions; - -public final class CallbackConfigInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CallbackConfigInner model = BinaryData.fromString( - "{\"serviceUri\":\"wem\",\"customHeaders\":{\"sfgytguslfead\":\"ncsdtclusiyp\",\"isxgfp\":\"ygqukyhejh\",\"vk\":\"lolp\"}}") - .toObject(CallbackConfigInner.class); - Assertions.assertEquals("wem", model.serviceUri()); - Assertions.assertEquals("ncsdtclusiyp", model.customHeaders().get("sfgytguslfead")); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java deleted file mode 100644 index c504226954ac..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeactivateMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedRegistriesDeactivateMockTests { - @Test - public void testDeactivate() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.connectedRegistries() - .deactivate("fqntcyp", "xjvfoimwksl", "rcizjxvyd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java deleted file mode 100644 index c358186618a6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ConnectedRegistriesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedRegistriesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.connectedRegistries().delete("xacpqjli", "hyus", "skasdvlmfwdgzxu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java deleted file mode 100644 index c8a2ef7f4c7f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventContentTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.EventContent; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class EventContentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventContent model = BinaryData.fromString( - "{\"id\":\"sgsahmkycgr\",\"timestamp\":\"2021-04-05T08:15:46Z\",\"action\":\"uetae\",\"target\":{\"mediaType\":\"u\",\"size\":7946094316421332336,\"digest\":\"s\",\"length\":122203340642919775,\"repository\":\"ab\",\"url\":\"oefki\",\"tag\":\"vtpuqujmqlgk\",\"name\":\"tndoaongbjc\",\"version\":\"ujitcjedftww\"},\"request\":{\"id\":\"kojvd\",\"addr\":\"zfoqouicybxar\",\"host\":\"szufoxciqopidoa\",\"method\":\"iodhkhazxkhnz\",\"useragent\":\"nlwntoe\"},\"actor\":{\"name\":\"dwbwhkszzcmrvexz\"},\"source\":{\"addr\":\"t\",\"instanceID\":\"sfraoyzko\"}}") - .toObject(EventContent.class); - Assertions.assertEquals("sgsahmkycgr", model.id()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.timestamp()); - Assertions.assertEquals("uetae", model.action()); - Assertions.assertEquals("u", model.target().mediaType()); - Assertions.assertEquals(7946094316421332336L, model.target().size()); - Assertions.assertEquals("s", model.target().digest()); - Assertions.assertEquals(122203340642919775L, model.target().length()); - Assertions.assertEquals("ab", model.target().repository()); - Assertions.assertEquals("oefki", model.target().url()); - Assertions.assertEquals("vtpuqujmqlgk", model.target().tag()); - Assertions.assertEquals("tndoaongbjc", model.target().name()); - Assertions.assertEquals("ujitcjedftww", model.target().version()); - Assertions.assertEquals("kojvd", model.request().id()); - Assertions.assertEquals("zfoqouicybxar", model.request().addr()); - Assertions.assertEquals("szufoxciqopidoa", model.request().host()); - Assertions.assertEquals("iodhkhazxkhnz", model.request().method()); - Assertions.assertEquals("nlwntoe", model.request().useragent()); - Assertions.assertEquals("dwbwhkszzcmrvexz", model.actor().name()); - Assertions.assertEquals("t", model.source().addr()); - Assertions.assertEquals("sfraoyzko", model.source().instanceID()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java deleted file mode 100644 index e98416c10432..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventInfoInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.EventInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class EventInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventInfoInner model = BinaryData.fromString("{\"id\":\"osjswsr\"}").toObject(EventInfoInner.class); - Assertions.assertEquals("osjswsr", model.id()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java deleted file mode 100644 index dc59af77deac..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/EventRequestMessageTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.EventRequestMessage; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class EventRequestMessageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventRequestMessage model = BinaryData.fromString( - "{\"content\":{\"id\":\"wnujhemmsbvdk\",\"timestamp\":\"2021-11-07T07:11:51Z\",\"action\":\"tjinf\",\"target\":{\"mediaType\":\"fltkacjv\",\"size\":6490344131392989957,\"digest\":\"foakgg\",\"length\":5309095811404897814,\"repository\":\"ao\",\"url\":\"ulpqblylsyxkqjn\",\"tag\":\"ervtiagxs\",\"name\":\"zuempsbzkf\",\"version\":\"eyvpnqicvinvkj\"},\"request\":{\"id\":\"xrbuukzclew\",\"addr\":\"mlwpazt\",\"host\":\"ofncckwyfzqwhxxb\",\"method\":\"qa\",\"useragent\":\"feqztppriol\"},\"actor\":{\"name\":\"jaltolmnc\"},\"source\":{\"addr\":\"bqwcsdbnwdcf\",\"instanceID\":\"cqdpfuv\"}},\"headers\":{\"anvx\":\"bjj\",\"xqtvcofu\":\"vtvudutncormr\"},\"method\":\"lvkgju\",\"requestUri\":\"dknnqvsazn\",\"version\":\"tor\"}") - .toObject(EventRequestMessage.class); - Assertions.assertEquals("wnujhemmsbvdk", model.content().id()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T07:11:51Z"), model.content().timestamp()); - Assertions.assertEquals("tjinf", model.content().action()); - Assertions.assertEquals("fltkacjv", model.content().target().mediaType()); - Assertions.assertEquals(6490344131392989957L, model.content().target().size()); - Assertions.assertEquals("foakgg", model.content().target().digest()); - Assertions.assertEquals(5309095811404897814L, model.content().target().length()); - Assertions.assertEquals("ao", model.content().target().repository()); - Assertions.assertEquals("ulpqblylsyxkqjn", model.content().target().url()); - Assertions.assertEquals("ervtiagxs", model.content().target().tag()); - Assertions.assertEquals("zuempsbzkf", model.content().target().name()); - Assertions.assertEquals("eyvpnqicvinvkj", model.content().target().version()); - Assertions.assertEquals("xrbuukzclew", model.content().request().id()); - Assertions.assertEquals("mlwpazt", model.content().request().addr()); - Assertions.assertEquals("ofncckwyfzqwhxxb", model.content().request().host()); - Assertions.assertEquals("qa", model.content().request().method()); - Assertions.assertEquals("feqztppriol", model.content().request().useragent()); - Assertions.assertEquals("jaltolmnc", model.content().actor().name()); - Assertions.assertEquals("bqwcsdbnwdcf", model.content().source().addr()); - Assertions.assertEquals("cqdpfuv", model.content().source().instanceID()); - Assertions.assertEquals("bjj", model.headers().get("anvx")); - Assertions.assertEquals("lvkgju", model.method()); - Assertions.assertEquals("dknnqvsazn", model.requestUri()); - Assertions.assertEquals("tor", model.version()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java deleted file mode 100644 index 0fc2a40893b7..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ExportPolicyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus; -import org.junit.jupiter.api.Assertions; - -public final class ExportPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExportPolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(ExportPolicy.class); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExportPolicy model = new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ExportPolicy.class); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java deleted file mode 100644 index 0ec27d71ed3b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/GarbageCollectionPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.GarbageCollectionProperties; -import org.junit.jupiter.api.Assertions; - -public final class GarbageCollectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":true,\"schedule\":\"kfssxqukkf\"}") - .toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("kfssxqukkf", model.schedule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GarbageCollectionProperties model - = new GarbageCollectionProperties().withEnabled(true).withSchedule("kfssxqukkf"); - model = BinaryData.fromObject(model).toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("kfssxqukkf", model.schedule()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java deleted file mode 100644 index d12aa2dd1b35..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IPRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Action; -import com.azure.resourcemanager.containerregistry.generated.models.IPRule; -import org.junit.jupiter.api.Assertions; - -public final class IPRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IPRule model = BinaryData.fromString("{\"action\":\"Allow\",\"value\":\"jyj\"}").toObject(IPRule.class); - Assertions.assertEquals(Action.ALLOW, model.action()); - Assertions.assertEquals("jyj", model.iPAddressOrRange()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IPRule model = new IPRule().withAction(Action.ALLOW).withIPAddressOrRange("jyj"); - model = BinaryData.fromObject(model).toObject(IPRule.class); - Assertions.assertEquals(Action.ALLOW, model.action()); - Assertions.assertEquals("jyj", model.iPAddressOrRange()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java deleted file mode 100644 index cf71fed5a622..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/IdentityPropertiesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ResourceIdentityType; -import com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProperties model = BinaryData.fromString( - "{\"principalId\":\"ewmdw\",\"tenantId\":\"eiachboosflnr\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wjdk\":{\"principalId\":\"eeh\",\"clientId\":\"vypyqrimzinpv\"},\"ifiyipjxsqwpgrj\":{\"principalId\":\"soodqxhcrmnoh\",\"clientId\":\"ckwhds\"}}}") - .toObject(IdentityProperties.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProperties model = new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("wjdk", new UserIdentityProperties(), "ifiyipjxsqwpgrj", new UserIdentityProperties())); - model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java deleted file mode 100644 index 83d4dab1f539..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoggingPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.AuditLogStatus; -import com.azure.resourcemanager.containerregistry.generated.models.LogLevel; -import com.azure.resourcemanager.containerregistry.generated.models.LoggingProperties; -import org.junit.jupiter.api.Assertions; - -public final class LoggingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggingProperties model = BinaryData.fromString("{\"logLevel\":\"Error\",\"auditLogStatus\":\"Enabled\"}") - .toObject(LoggingProperties.class); - Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); - Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggingProperties model - = new LoggingProperties().withLogLevel(LogLevel.ERROR).withAuditLogStatus(AuditLogStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(LoggingProperties.class); - Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); - Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java deleted file mode 100644 index 1d8ad2ece593..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/LoginServerPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.LoginServerProperties; - -public final class LoginServerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginServerProperties model = BinaryData.fromString( - "{\"host\":\"jancu\",\"tls\":{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"xbniwdjs\"}}}") - .toObject(LoginServerProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginServerProperties model = new LoginServerProperties(); - model = BinaryData.fromObject(model).toObject(LoginServerProperties.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java deleted file mode 100644 index 6baba64fc52f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/NetworkRuleSetTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Action; -import com.azure.resourcemanager.containerregistry.generated.models.DefaultAction; -import com.azure.resourcemanager.containerregistry.generated.models.IPRule; -import com.azure.resourcemanager.containerregistry.generated.models.NetworkRuleSet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRuleSetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRuleSet model = BinaryData - .fromString("{\"defaultAction\":\"Allow\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"fpsalgbqu\"}]}") - .toObject(NetworkRuleSet.class); - Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); - Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).iPAddressOrRange()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRuleSet model = new NetworkRuleSet().withDefaultAction(DefaultAction.ALLOW) - .withIpRules(Arrays.asList(new IPRule().withAction(Action.ALLOW).withIPAddressOrRange("fpsalgbqu"))); - model = BinaryData.fromObject(model).toObject(NetworkRuleSet.class); - Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); - Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).iPAddressOrRange()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java deleted file mode 100644 index aca250a8f971..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDefinitionInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationDefinitionInner; -import org.junit.jupiter.api.Assertions; - -public final class OperationDefinitionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDefinitionInner model = BinaryData.fromString( - "{\"origin\":\"smy\",\"name\":\"kdtmlxhekuk\",\"display\":{\"provider\":\"xukcdmpar\",\"resource\":\"y\",\"operation\":\"nzwuxzd\",\"description\":\"a\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hfpmrqobmtukknr\",\"displayName\":\"tihfx\",\"displayDescription\":\"jbpzvgnwzsymg\",\"unit\":\"uf\",\"aggregationType\":\"zk\",\"internalMetricName\":\"dbihanufhfcbj\"}],\"logSpecifications\":[{\"name\":\"ithxqhabifpi\",\"displayName\":\"wczbys\",\"blobDuration\":\"pqxu\"}]}},\"isDataAction\":false}") - .toObject(OperationDefinitionInner.class); - Assertions.assertEquals("smy", model.origin()); - Assertions.assertEquals("kdtmlxhekuk", model.name()); - Assertions.assertEquals("xukcdmpar", model.display().provider()); - Assertions.assertEquals("y", model.display().resource()); - Assertions.assertEquals("nzwuxzd", model.display().operation()); - Assertions.assertEquals("a", model.display().description()); - Assertions.assertFalse(model.isDataAction()); - Assertions.assertEquals("hfpmrqobmtukknr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("tihfx", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("jbpzvgnwzsymg", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("uf", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("zk", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("dbihanufhfcbj", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("ithxqhabifpi", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("wczbys", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("pqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java deleted file mode 100644 index 024e86957b1c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationDisplayDefinitionTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDisplayDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplayDefinition model = BinaryData.fromString( - "{\"provider\":\"qniwbybrkxvdumj\",\"resource\":\"tfwvukxgaudc\",\"operation\":\"nhsjcnyej\",\"description\":\"ryhtnapczwlokjy\"}") - .toObject(OperationDisplayDefinition.class); - Assertions.assertEquals("qniwbybrkxvdumj", model.provider()); - Assertions.assertEquals("tfwvukxgaudc", model.resource()); - Assertions.assertEquals("nhsjcnyej", model.operation()); - Assertions.assertEquals("ryhtnapczwlokjy", model.description()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java deleted file mode 100644 index 4768f4102bed..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationListResultTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.OperationListResult; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"origin\":\"quvgjxpybczme\",\"name\":\"tzopbsphrupidgsy\",\"display\":{\"provider\":\"jhphoyc\",\"resource\":\"xaobhdxbmtqioqjz\",\"operation\":\"tbmufpo\",\"description\":\"oizh\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":true},{\"origin\":\"ijgkdm\",\"name\":\"azlobcufpdznrbt\",\"display\":{\"provider\":\"jnqglhqgnu\",\"resource\":\"oo\",\"operation\":\"wifsq\",\"description\":\"aagdfmg\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{}],\"logSpecifications\":[{},{}]}},\"isDataAction\":false},{\"origin\":\"wmrvktsizntocipa\",\"name\":\"ajpsquc\",\"display\":{\"provider\":\"yf\",\"resource\":\"fogknygjofjdde\",\"operation\":\"rd\",\"description\":\"pewnw\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":false}],\"nextLink\":\"sarhmofc\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).origin()); - Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).name()); - Assertions.assertEquals("jhphoyc", model.value().get(0).display().provider()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().resource()); - Assertions.assertEquals("tbmufpo", model.value().get(0).display().operation()); - Assertions.assertEquals("oizh", model.value().get(0).display().description()); - Assertions.assertTrue(model.value().get(0).isDataAction()); - Assertions.assertEquals("sarhmofc", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java deleted file mode 100644 index 5e1228e874bb..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationLogSpecificationDefinitionTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.OperationLogSpecificationDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationLogSpecificationDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationLogSpecificationDefinition model = BinaryData - .fromString("{\"name\":\"vmgxsab\",\"displayName\":\"qduujitcjczdz\",\"blobDuration\":\"ndhkrw\"}") - .toObject(OperationLogSpecificationDefinition.class); - Assertions.assertEquals("vmgxsab", model.name()); - Assertions.assertEquals("qduujitcjczdz", model.displayName()); - Assertions.assertEquals("ndhkrw", model.blobDuration()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java deleted file mode 100644 index 89dbae3f7255..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationMetricSpecificationDefinitionTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.OperationMetricSpecificationDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetricSpecificationDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetricSpecificationDefinition model = BinaryData.fromString( - "{\"name\":\"lxxwrljdouskc\",\"displayName\":\"kocrcjdkwtnhx\",\"displayDescription\":\"jbiksqrglssai\",\"unit\":\"p\",\"aggregationType\":\"nzl\",\"internalMetricName\":\"fmppe\"}") - .toObject(OperationMetricSpecificationDefinition.class); - Assertions.assertEquals("lxxwrljdouskc", model.name()); - Assertions.assertEquals("kocrcjdkwtnhx", model.displayName()); - Assertions.assertEquals("jbiksqrglssai", model.displayDescription()); - Assertions.assertEquals("p", model.unit()); - Assertions.assertEquals("nzl", model.aggregationType()); - Assertions.assertEquals("fmppe", model.internalMetricName()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java deleted file mode 100644 index 6fc2f7709d79..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationPropertiesDefinitionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.OperationPropertiesDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationPropertiesDefinition model = BinaryData.fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ni\",\"displayName\":\"oxzjnchgejspod\",\"displayDescription\":\"ilzyd\",\"unit\":\"o\",\"aggregationType\":\"yahux\",\"internalMetricName\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"displayName\":\"wmfdatscmdvpjhul\",\"displayDescription\":\"uvm\",\"unit\":\"ozkrwfndiodjpslw\",\"aggregationType\":\"dpvwryoqpsoaccta\",\"internalMetricName\":\"kljla\"},{\"name\":\"cr\",\"displayName\":\"fdfdosygexpa\",\"displayDescription\":\"akhmsbzjhcrz\",\"unit\":\"dphlxaolt\",\"aggregationType\":\"trg\",\"internalMetricName\":\"bpf\"}],\"logSpecifications\":[{\"name\":\"n\",\"displayName\":\"v\",\"blobDuration\":\"jrwzox\"}]}}") - .toObject(OperationPropertiesDefinition.class); - Assertions.assertEquals("ni", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("oxzjnchgejspod", - model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ilzyd", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("o", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("yahux", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("pmqnja", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("n", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("jrwzox", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java deleted file mode 100644 index 8416f6af9b60..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationServiceSpecificationDefinitionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.OperationServiceSpecificationDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationServiceSpecificationDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationServiceSpecificationDefinition model = BinaryData.fromString( - "{\"metricSpecifications\":[{\"name\":\"elluwfziton\",\"displayName\":\"qfpjk\",\"displayDescription\":\"xofpdvhpfxxypi\",\"unit\":\"nmayhuybb\",\"aggregationType\":\"odepoogin\",\"internalMetricName\":\"amiheognarxz\"},{\"name\":\"heotusiv\",\"displayName\":\"v\",\"displayDescription\":\"iqihn\",\"unit\":\"ngbwjz\",\"aggregationType\":\"fygxgispemvtzfk\",\"internalMetricName\":\"ubljofxqe\"}],\"logSpecifications\":[{\"name\":\"e\",\"displayName\":\"hqjbasvmsmj\",\"blobDuration\":\"lngsntnbybkzgcwr\"}]}") - .toObject(OperationServiceSpecificationDefinition.class); - Assertions.assertEquals("elluwfziton", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("qfpjk", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("xofpdvhpfxxypi", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("nmayhuybb", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("odepoogin", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("amiheognarxz", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("e", model.logSpecifications().get(0).name()); - Assertions.assertEquals("hqjbasvmsmj", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java deleted file mode 100644 index cfa3bb6ed6b2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/OperationsListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.OperationDefinition; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"origin\":\"pqvujzraehtwdwrf\",\"name\":\"wib\",\"display\":{\"provider\":\"dl\",\"resource\":\"shfwpracstwity\",\"operation\":\"evxccedcp\",\"description\":\"dyodnwzxltj\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"iugcxnavvwxq\",\"displayName\":\"y\",\"displayDescription\":\"nyowxwlmdjrkvfg\",\"unit\":\"fvpdbo\",\"aggregationType\":\"cizsjqlhkrribdei\",\"internalMetricName\":\"ipqkghvxndzwm\"},{\"name\":\"efajpj\",\"displayName\":\"wkqnyhg\",\"displayDescription\":\"j\",\"unit\":\"ivfxzsjabibsyst\",\"aggregationType\":\"fsdjpvkvp\",\"internalMetricName\":\"xbkzbzkdvncj\"},{\"name\":\"udurgkakmokz\",\"displayName\":\"jk\",\"displayDescription\":\"fhmouwq\",\"unit\":\"zrfze\",\"aggregationType\":\"ebizikayuh\",\"internalMetricName\":\"bjbsybb\"}],\"logSpecifications\":[{\"name\":\"t\",\"displayName\":\"gmfpgvmp\",\"blobDuration\":\"as\"}]}},\"isDataAction\":false}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pqvujzraehtwdwrf", response.iterator().next().origin()); - Assertions.assertEquals("wib", response.iterator().next().name()); - Assertions.assertEquals("dl", response.iterator().next().display().provider()); - Assertions.assertEquals("shfwpracstwity", response.iterator().next().display().resource()); - Assertions.assertEquals("evxccedcp", response.iterator().next().display().operation()); - Assertions.assertEquals("dyodnwzxltj", response.iterator().next().display().description()); - Assertions.assertFalse(response.iterator().next().isDataAction()); - Assertions.assertEquals("iugcxnavvwxq", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("y", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("nyowxwlmdjrkvfg", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("fvpdbo", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("cizsjqlhkrribdei", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("ipqkghvxndzwm", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("t", - response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("gmfpgvmp", - response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("as", - response.iterator().next().serviceSpecification().logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java deleted file mode 100644 index 5ee94b4caba5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PoliciesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.AzureADAuthenticationAsArmPolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.ExportPolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.Policies; -import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy; -import com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType; -import org.junit.jupiter.api.Assertions; - -public final class PoliciesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Policies model = BinaryData.fromString( - "{\"quarantinePolicy\":{\"status\":\"disabled\"},\"trustPolicy\":{\"type\":\"Notary\",\"status\":\"enabled\"},\"retentionPolicy\":{\"days\":1951867342,\"lastUpdatedTime\":\"2021-10-31T08:55:11Z\",\"status\":\"enabled\"},\"exportPolicy\":{\"status\":\"enabled\"},\"azureADAuthenticationAsArmPolicy\":{\"status\":\"disabled\"}}") - .toObject(Policies.class); - Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); - Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); - Assertions.assertEquals(1951867342, model.retentionPolicy().days()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, - model.azureADAuthenticationAsArmPolicy().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Policies model = new Policies().withQuarantinePolicy(new QuarantinePolicy().withStatus(PolicyStatus.DISABLED)) - .withTrustPolicy(new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.ENABLED)) - .withRetentionPolicy(new RetentionPolicy().withDays(1951867342).withStatus(PolicyStatus.ENABLED)) - .withExportPolicy(new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED)) - .withAzureADAuthenticationAsArmPolicy( - new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.DISABLED)); - model = BinaryData.fromObject(model).toObject(Policies.class); - Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); - Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); - Assertions.assertEquals(1951867342, model.retentionPolicy().days()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, - model.azureADAuthenticationAsArmPolicy().status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 21920d656029..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"ouqfprwz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"itnwuizgazxufi\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"},\"id\":\"i\",\"name\":\"rfidfvzwdz\",\"type\":\"htymw\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ouqfprwz", model.properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("itnwuizgazxufi", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - model.properties().privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner().withProperties( - new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("ouqfprwz")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("itnwuizgazxufi") - .withActionsRequired(ActionsRequired.NONE))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ouqfprwz", model.properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("itnwuizgazxufi", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - model.properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 717af87a4c12..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qnermclfplphoxu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bgyepsbj\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"xywpmueefjzwfqkq\",\"name\":\"jidsuyonobglaoc\",\"type\":\"xtccmg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ytlmoyrxvwfud\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"xhdzhlrqjbhckf\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"bkyvp\",\"name\":\"ca\",\"type\":\"uzbpzkafku\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"nwbmeh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jusrtslhspk\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Creating\"},\"id\":\"fm\",\"name\":\"ag\",\"type\":\"vt\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"qkrhahvljua\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"c\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"laexqp\",\"name\":\"fadmws\",\"type\":\"crgvxpvgom\"}],\"nextLink\":\"fmisg\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("qnermclfplphoxu", model.value().get(0).properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.PENDING, - model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bgyepsbj", - model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("fmisg", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 1ae0d62fc017..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"kfthwxmntei\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"km\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("kfthwxmntei")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) - .withDescription("km") - .withActionsRequired(ActionsRequired.NONE)); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 4e5b140597aa..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"abqgzslesjcbh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"iew\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uwrbehwagoh\",\"name\":\"uffkmrqemvvh\",\"type\":\"xtdr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateEndpointConnection response - = manager.privateEndpointConnections() - .define("qjfsmlmbtxhw") - .withExistingRegistry("dqkdlwwqfbu", "lkxt") - .withProperties(new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint().withId("rtawcoezb")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) - .withDescription("kh") - .withActionsRequired(ActionsRequired.NONE))) - .create(); - - Assertions.assertEquals("abqgzslesjcbh", response.properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.PENDING, - response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("iew", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - response.properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index f5665a45af03..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.privateEndpointConnections() - .delete("zqljyxgtczh", "ydbsd", "hmkxmaehvbb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index bde857c39efc..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ovqfzge\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"uljltduceamtmcz\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"cwwqiokn\",\"name\":\"sx\",\"type\":\"ojmsvpkjprvkwc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("bydvkhbejdz", "xcv", "srhnjivo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ovqfzge", response.properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("uljltduceamtmcz", - response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - response.properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 5133b1e204ca..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpointConnection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"kl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"odpvruudlgzib\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Failed\"},\"id\":\"ktst\",\"name\":\"dxeclzedqbcvh\",\"type\":\"lhpl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.privateEndpointConnections().list("uripltfnhtba", "kgxywr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kl", response.iterator().next().properties().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("odpvruudlgzib", - response.iterator().next().properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, - response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java deleted file mode 100644 index b5e3c14660ff..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"dcuf\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("dcuf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("dcuf"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("dcuf", model.id()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index fe7a577e4ff6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.PrivateLinkResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"okth\",\"requiredMembers\":[\"uaodsfcpk\",\"xodpuozmyzydagfu\"],\"requiredZoneNames\":[\"ezyiuokktwhrdxw\"]},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("ezyiuokktwhrdxw", model.properties().requiredZoneNames().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 7432d3b3799b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.PrivateLinkResourceListResult; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"pxjmflbvvnchr\",\"requiredMembers\":[\"iwwzjuqk\",\"rsa\",\"iwkuofos\"],\"requiredZoneNames\":[\"sauuimj\",\"vxieduugidyj\",\"rfbyaosvexcso\",\"pclhocohslk\"]},\"id\":\"leggzfbu\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"igrxwburvjxxjn\",\"requiredMembers\":[\"dptkoenkouk\",\"vudwtiukbldng\"],\"requiredZoneNames\":[\"cipazyxoegukgjnp\",\"ucgygevqz\",\"typmrbpizcdrqjsd\"]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"},{\"properties\":{\"groupId\":\"eyeam\",\"requiredMembers\":[\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"requiredZoneNames\":[\"uttmrywnuzoqft\"]},\"id\":\"qzrnkcqvyxlwhz\",\"name\":\"sicohoqqnwvlry\",\"type\":\"vwhheunmmqhgyx\"},{\"properties\":{\"groupId\":\"noc\",\"requiredMembers\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"],\"requiredZoneNames\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]},\"id\":\"ihkaetcktvfc\",\"name\":\"vf\",\"type\":\"nkymuctqhjfbebrj\"}],\"nextLink\":\"erfuwuttt\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("sauuimj", model.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("erfuwuttt", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index b620185efe85..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"tki\",\"requiredMembers\":[\"hqyudxorrqnbpoc\",\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"requiredZoneNames\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("exxbczwtr", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 7848c31a5ca9..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ActionsRequired; -import com.azure.resourcemanager.containerregistry.generated.models.ConnectionStatus; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Approved\",\"description\":\"pymzidnsezcxtbzs\",\"actionsRequired\":\"None\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); - Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("pymzidnsezcxtbzs") - .withActionsRequired(ActionsRequired.NONE); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); - Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java deleted file mode 100644 index ff82a7839665..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/QuarantinePolicyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.QuarantinePolicy; -import org.junit.jupiter.api.Assertions; - -public final class QuarantinePolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuarantinePolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(QuarantinePolicy.class); - Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuarantinePolicy model = new QuarantinePolicy().withStatus(PolicyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(QuarantinePolicy.class); - Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java deleted file mode 100644 index 4e87697f2b84..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegenerateCredentialParametersTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; -import com.azure.resourcemanager.containerregistry.generated.models.RegenerateCredentialParameters; -import org.junit.jupiter.api.Assertions; - -public final class RegenerateCredentialParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegenerateCredentialParameters model - = BinaryData.fromString("{\"name\":\"password2\"}").toObject(RegenerateCredentialParameters.class); - Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegenerateCredentialParameters model = new RegenerateCredentialParameters().withName(PasswordName.PASSWORD2); - model = BinaryData.fromObject(model).toObject(RegenerateCredentialParameters.class); - Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index e9ba848c3262..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"umh\",\"message\":\"lik\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RegistryNameStatus response = manager.registries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("krrjrea") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertTrue(response.nameAvailable()); - Assertions.assertEquals("umh", response.reason()); - Assertions.assertEquals("lik", response.message()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java deleted file mode 100644 index dcb7e46e02b6..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.registries().delete("rqmq", "ldvriiiojnalghfk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java deleted file mode 100644 index 4e70923e20ac..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesGetPrivateLinkResourceWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesGetPrivateLinkResourceWithResponseMockTests { - @Test - public void testGetPrivateLinkResourceWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"groupId\":\"znoigbrn\",\"requiredMembers\":[\"wkpnbsaz\"],\"requiredZoneNames\":[\"oqkag\",\"hsxttaugzxnf\",\"azpxdtnkdmkqjjl\"]},\"id\":\"envrkpyouaibrebq\",\"name\":\"aysjkixqtnqttez\",\"type\":\"wfff\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateLinkResource response = manager.registries() - .getPrivateLinkResourceWithResponse("xwslolbqpv", "zlmvfelfktgp", "crpw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("oqkag", response.properties().requiredZoneNames().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java deleted file mode 100644 index 1f2b9af7497b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListPrivateLinkResourcesMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListPrivateLinkResourcesMockTests { - @Test - public void testListPrivateLinkResources() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"y\",\"requiredMembers\":[\"ygupkv\"],\"requiredZoneNames\":[\"dscwxqupevzhf\",\"totxhojujb\",\"pelmcuvhixbjxyf\"]},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.registries() - .listPrivateLinkResources("akpjpqqmtedlt", "mjihyeozphv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dscwxqupevzhf", response.iterator().next().properties().requiredZoneNames().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java deleted file mode 100644 index 368e64204945..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistriesListUsagesWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageListResult; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListUsagesWithResponseMockTests { - @Test - public void testListUsagesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"jioolvrwxk\",\"limit\":4652937384056066741,\"currentValue\":8177412740646436635,\"unit\":\"Bytes\"},{\"name\":\"ygvjayvblmh\",\"limit\":6263102268432414718,\"currentValue\":7397419477028168638,\"unit\":\"Count\"},{\"name\":\"hgsopbyrqufegx\",\"limit\":1956325765685570112,\"currentValue\":5985598462437896082,\"unit\":\"Count\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RegistryUsageListResult response = manager.registries() - .listUsagesWithResponse("qaatjinrv", "oupmfii", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jioolvrwxk", response.value().get(0).name()); - Assertions.assertEquals(4652937384056066741L, response.value().get(0).limit()); - Assertions.assertEquals(8177412740646436635L, response.value().get(0).currentValue()); - Assertions.assertEquals(RegistryUsageUnit.BYTES, response.value().get(0).unit()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java deleted file mode 100644 index 8ef61ecf5ca8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameCheckRequestTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ContainerRegistryResourceType; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryNameCheckRequest; -import org.junit.jupiter.api.Assertions; - -public final class RegistryNameCheckRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryNameCheckRequest model - = BinaryData.fromString("{\"name\":\"mdajv\",\"type\":\"Microsoft.ContainerRegistry/registries\"}") - .toObject(RegistryNameCheckRequest.class); - Assertions.assertEquals("mdajv", model.name()); - Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES); - model = BinaryData.fromObject(model).toObject(RegistryNameCheckRequest.class); - Assertions.assertEquals("mdajv", model.name()); - Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java deleted file mode 100644 index bb47e240330f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryNameStatusInnerTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryNameStatusInner; -import org.junit.jupiter.api.Assertions; - -public final class RegistryNameStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryNameStatusInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"nqecanoaeup\",\"message\":\"yhltrpmopjmcm\"}") - .toObject(RegistryNameStatusInner.class); - Assertions.assertTrue(model.nameAvailable()); - Assertions.assertEquals("nqecanoaeup", model.reason()); - Assertions.assertEquals("yhltrpmopjmcm", model.message()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java deleted file mode 100644 index 656aeffbb51c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryPasswordTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PasswordName; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryPassword; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPassword model = BinaryData.fromString("{\"name\":\"password2\",\"value\":\"bqvudwxdndn\"}") - .toObject(RegistryPassword.class); - Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); - Assertions.assertEquals("bqvudwxdndn", model.value()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java deleted file mode 100644 index a120f4af01f0..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageListResultInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; -import org.junit.jupiter.api.Assertions; - -public final class RegistryUsageListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryUsageListResultInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"bonqvpkvlrxnjeas\",\"limit\":2687249492266688034,\"currentValue\":8008413633793129277,\"unit\":\"Bytes\"},{\"name\":\"eyy\",\"limit\":1523460255580500378,\"currentValue\":1246859219124083387,\"unit\":\"Bytes\"},{\"name\":\"rhpdjpjumas\",\"limit\":1164635978047948118,\"currentValue\":4118233747929526801,\"unit\":\"Count\"}]}") - .toObject(RegistryUsageListResultInner.class); - Assertions.assertEquals("bonqvpkvlrxnjeas", model.value().get(0).name()); - Assertions.assertEquals(2687249492266688034L, model.value().get(0).limit()); - Assertions.assertEquals(8008413633793129277L, model.value().get(0).currentValue()); - Assertions.assertEquals(RegistryUsageUnit.BYTES, model.value().get(0).unit()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java deleted file mode 100644 index e4f34884f393..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RegistryUsageTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsage; -import com.azure.resourcemanager.containerregistry.generated.models.RegistryUsageUnit; -import org.junit.jupiter.api.Assertions; - -public final class RegistryUsageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryUsage model = BinaryData.fromString( - "{\"name\":\"alhbx\",\"limit\":65515238204620048,\"currentValue\":2136882508954141287,\"unit\":\"Bytes\"}") - .toObject(RegistryUsage.class); - Assertions.assertEquals("alhbx", model.name()); - Assertions.assertEquals(65515238204620048L, model.limit()); - Assertions.assertEquals(2136882508954141287L, model.currentValue()); - Assertions.assertEquals(RegistryUsageUnit.BYTES, model.unit()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java deleted file mode 100644 index d7ca6913025c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"ldawkzbaliourqha\",\"message\":\"uhashsfwx\",\"timestamp\":\"2021-10-19T13:09:56Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"gicjooxdjeb\",\"tags\":{\"ecivyh\":\"cwwfvovbvme\"},\"id\":\"ce\",\"name\":\"ojgjrwjueiotwmc\",\"type\":\"ytdxwit\"}") - .toObject(ReplicationInner.class); - Assertions.assertEquals("gicjooxdjeb", model.location()); - Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); - Assertions.assertFalse(model.properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.DISABLED, model.properties().zoneRedundancy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationInner model = new ReplicationInner().withLocation("gicjooxdjeb") - .withTags(mapOf("ecivyh", "cwwfvovbvme")) - .withProperties(new ReplicationProperties().withRegionEndpointEnabled(false) - .withZoneRedundancy(ZoneRedundancy.DISABLED)); - model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals("gicjooxdjeb", model.location()); - Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); - Assertions.assertFalse(model.properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.DISABLED, model.properties().zoneRedundancy()); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java deleted file mode 100644 index a3fe15e1c555..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationListResultTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.ReplicationListResult; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":{\"displayStatus\":\"przqlveu\",\"message\":\"upjm\",\"timestamp\":\"2021-08-12T08:43:21Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"sw\",\"tags\":{\"blcg\":\"jriplrbpbewtghf\",\"nmxiebwwaloayqc\":\"xzvlvqhjkbegib\"},\"id\":\"wrtz\",\"name\":\"uzgwyzmhtx\",\"type\":\"ngmtsavjcb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":{\"displayStatus\":\"rknftguvriuhprwm\",\"message\":\"vxqtayriwwroyqbe\",\"timestamp\":\"2021-06-25T11:51:15Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"cnojvknmefqsg\",\"tags\":{\"j\":\"hapjyzhpvgqz\"},\"id\":\"vxdjzlmwlxkvugf\",\"name\":\"zovawjvz\",\"type\":\"nluthnnp\"}],\"nextLink\":\"xipeilpjzuaejx\"}") - .toObject(ReplicationListResult.class); - Assertions.assertEquals("sw", model.value().get(0).location()); - Assertions.assertEquals("jriplrbpbewtghf", model.value().get(0).tags().get("blcg")); - Assertions.assertFalse(model.value().get(0).properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, model.value().get(0).properties().zoneRedundancy()); - Assertions.assertEquals("xipeilpjzuaejx", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java deleted file mode 100644 index 4c3094fe3e2f..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"wgqwgxhn\",\"message\":\"kxfbkpycgklwndn\",\"timestamp\":\"2021-06-18T07:43:59Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"}") - .toObject(ReplicationProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProperties model - = new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED); - model = BinaryData.fromObject(model).toObject(ReplicationProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java deleted file mode 100644 index f4d375ff155a..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ReplicationUpdateParametersProperties; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationUpdateParametersPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationUpdateParametersProperties model = BinaryData.fromString("{\"regionEndpointEnabled\":true}") - .toObject(ReplicationUpdateParametersProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationUpdateParametersProperties model - = new ReplicationUpdateParametersProperties().withRegionEndpointEnabled(true); - model = BinaryData.fromObject(model).toObject(ReplicationUpdateParametersProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java deleted file mode 100644 index cff42bc335b4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationUpdateParametersTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationUpdateParameters model - = BinaryData.fromString("{\"tags\":{\"zbtd\":\"l\"},\"properties\":{\"regionEndpointEnabled\":false}}") - .toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("l", model.tags().get("zbtd")); - Assertions.assertFalse(model.regionEndpointEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationUpdateParameters model - = new ReplicationUpdateParameters().withTags(mapOf("zbtd", "l")).withRegionEndpointEnabled(false); - model = BinaryData.fromObject(model).toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("l", model.tags().get("zbtd")); - Assertions.assertFalse(model.regionEndpointEnabled()); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java deleted file mode 100644 index fc048224dde3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsCreateMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import com.azure.resourcemanager.containerregistry.generated.models.ReplicationProperties; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"juisavokqdzf\",\"message\":\"zivj\",\"timestamp\":\"2021-07-08T09:37:13Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"jlkatnwxy\",\"tags\":{\"qqfkuv\":\"id\",\"rxkpmloazuruoc\":\"cxkdmligovi\",\"bfhjxakvvjgsl\":\"goorbteo\",\"il\":\"r\"},\"id\":\"yw\",\"name\":\"t\",\"type\":\"gkxnyedabg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Replication response = manager.replications() - .define("pi") - .withRegion("kfm") - .withExistingRegistry("pthjoxo", "smsks") - .withTags(mapOf("wzf", "g")) - .withProperties( - new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED)) - .create(); - - Assertions.assertEquals("jlkatnwxy", response.location()); - Assertions.assertEquals("id", response.tags().get("qqfkuv")); - Assertions.assertFalse(response.properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, response.properties().zoneRedundancy()); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java deleted file mode 100644 index 09e6c8da7db4..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.replications() - .delete("alywjhhgdn", "xmsivfomiloxggdu", "iqndieuzaofj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java deleted file mode 100644 index 620f21d2fc0c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"iuxxpshneekulfg\",\"message\":\"qubkw\",\"timestamp\":\"2021-05-19T05:23:07Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"tujbazpju\",\"tags\":{\"lvxwmyg\":\"inyflnorwmduvwp\",\"hiszepnnbjcrxgib\":\"xpgpq\",\"kwbqplhlvnuu\":\"daxconfozauorsuk\"},\"id\":\"pzlrphw\",\"name\":\"soldweyuqdunv\",\"type\":\"nnrwrbiork\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Replication response = manager.replications() - .getWithResponse("futacoebjvewzc", "znmwcp", "guaadraufactkahz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tujbazpju", response.location()); - Assertions.assertEquals("inyflnorwmduvwp", response.tags().get("lvxwmyg")); - Assertions.assertFalse(response.properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, response.properties().zoneRedundancy()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java deleted file mode 100644 index 26486bcdb007..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ReplicationsListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Replication; -import com.azure.resourcemanager.containerregistry.generated.models.ZoneRedundancy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"oqonma\",\"message\":\"ekni\",\"timestamp\":\"2021-10-27T20:39:18Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"pevf\",\"tags\":{\"bywdxsmicc\":\"lrri\"},\"id\":\"rwfscjfnynszquj\",\"name\":\"zdvoqytibyowbb\",\"type\":\"gyavu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.replications().list("hvcyyysfg", "otcubi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pevf", response.iterator().next().location()); - Assertions.assertEquals("lrri", response.iterator().next().tags().get("bywdxsmicc")); - Assertions.assertFalse(response.iterator().next().properties().regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, response.iterator().next().properties().zoneRedundancy()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java deleted file mode 100644 index 6544b084161b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RequestTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Request; -import org.junit.jupiter.api.Assertions; - -public final class RequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Request model = BinaryData.fromString( - "{\"id\":\"vbbejdcng\",\"addr\":\"m\",\"host\":\"kufgmj\",\"method\":\"wr\",\"useragent\":\"rtwaenuuzko\"}") - .toObject(Request.class); - Assertions.assertEquals("vbbejdcng", model.id()); - Assertions.assertEquals("m", model.addr()); - Assertions.assertEquals("kufgmj", model.host()); - Assertions.assertEquals("wr", model.method()); - Assertions.assertEquals("rtwaenuuzko", model.useragent()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java deleted file mode 100644 index 1d5441addecb..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/RetentionPolicyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.RetentionPolicy; -import org.junit.jupiter.api.Assertions; - -public final class RetentionPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RetentionPolicy model = BinaryData - .fromString("{\"days\":1398747720,\"lastUpdatedTime\":\"2021-04-29T02:40:58Z\",\"status\":\"enabled\"}") - .toObject(RetentionPolicy.class); - Assertions.assertEquals(1398747720, model.days()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RetentionPolicy model = new RetentionPolicy().withDays(1398747720).withStatus(PolicyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(RetentionPolicy.class); - Assertions.assertEquals(1398747720, model.days()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java deleted file mode 100644 index b9a11f64be55..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScopeMapInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScopeMapInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"tskzbbtdzumveek\",\"type\":\"wozuhkf\",\"creationDate\":\"2021-11-15T23:25:51Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"f\"]},\"id\":\"luu\",\"name\":\"dttouwaboekqvkel\",\"type\":\"smv\"}") - .toObject(ScopeMapInner.class); - Assertions.assertEquals("tskzbbtdzumveek", model.properties().description()); - Assertions.assertEquals("f", model.properties().actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScopeMapInner model = new ScopeMapInner().withProperties( - new ScopeMapProperties().withDescription("tskzbbtdzumveek").withActions(Arrays.asList("f"))); - model = BinaryData.fromObject(model).toObject(ScopeMapInner.class); - Assertions.assertEquals("tskzbbtdzumveek", model.properties().description()); - Assertions.assertEquals("f", model.properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java deleted file mode 100644 index fd394c8d9c6e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapListResultTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.ScopeMapListResult; -import org.junit.jupiter.api.Assertions; - -public final class ScopeMapListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScopeMapListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"tfdygpfqb\",\"type\":\"ceopzfqrhhuaopp\",\"creationDate\":\"2021-12-04T10:32:02Z\",\"provisioningState\":\"Failed\",\"actions\":[\"ol\",\"dahzxctobg\",\"kdmoi\"]},\"id\":\"ostmgrcf\",\"name\":\"unrmfqjhhkxb\",\"type\":\"vjymjhxxjyngud\"},{\"properties\":{\"description\":\"r\",\"type\":\"wbxqzvszjfau\",\"creationDate\":\"2021-09-23T21:18:01Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"ivetvtcq\",\"qtdo\"]},\"id\":\"cbxvwvxyslqbh\",\"name\":\"fxoblytkb\",\"type\":\"mpew\"}],\"nextLink\":\"fbkrvrnsvs\"}") - .toObject(ScopeMapListResult.class); - Assertions.assertEquals("tfdygpfqb", model.value().get(0).properties().description()); - Assertions.assertEquals("ol", model.value().get(0).properties().actions().get(0)); - Assertions.assertEquals("fbkrvrnsvs", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java deleted file mode 100644 index 871159a741a2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScopeMapPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScopeMapProperties model = BinaryData.fromString( - "{\"description\":\"wyjsflhhcaalnjix\",\"type\":\"xyawj\",\"creationDate\":\"2021-08-07T05:01:18Z\",\"provisioningState\":\"Failed\",\"actions\":[\"lyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"]}") - .toObject(ScopeMapProperties.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); - Assertions.assertEquals("lyjpk", model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScopeMapProperties model = new ScopeMapProperties().withDescription("wyjsflhhcaalnjix") - .withActions(Arrays.asList("lyjpk", "idzyexznelixhnr", "tfolhbnx")); - model = BinaryData.fromObject(model).toObject(ScopeMapProperties.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); - Assertions.assertEquals("lyjpk", model.actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java deleted file mode 100644 index 3adedeebb698..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapPropertiesUpdateParametersTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.ScopeMapPropertiesUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScopeMapPropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScopeMapPropertiesUpdateParameters model - = BinaryData.fromString("{\"description\":\"hxg\",\"actions\":[\"mgucna\",\"kteo\"]}") - .toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("hxg", model.description()); - Assertions.assertEquals("mgucna", model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScopeMapPropertiesUpdateParameters model = new ScopeMapPropertiesUpdateParameters().withDescription("hxg") - .withActions(Arrays.asList("mgucna", "kteo")); - model = BinaryData.fromObject(model).toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("hxg", model.description()); - Assertions.assertEquals("mgucna", model.actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java deleted file mode 100644 index b476c65ed449..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapUpdateParametersTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScopeMapUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScopeMapUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"description\":\"laulppg\",\"actions\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"]}}") - .toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("laulppg", model.description()); - Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("laulppg") - .withActions(Arrays.asList("pnapnyiropuh", "igvpgylg", "git", "medjvcslynqwwncw")); - model = BinaryData.fromObject(model).toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("laulppg", model.description()); - Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java deleted file mode 100644 index b389686ded62..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsCreateMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMapProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScopeMapsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"ziycslevufuztck\",\"type\":\"h\",\"creationDate\":\"2021-05-19T13:18:23Z\",\"provisioningState\":\"Succeeded\",\"actions\":[\"gzulwmmrqzzr\",\"jvpglydzgk\",\"vqeevtoep\",\"yutnwytpzdmov\"]},\"id\":\"fvaawzqa\",\"name\":\"f\",\"type\":\"gzuriglaecxndt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ScopeMap response = manager.scopeMaps() - .define("vofqzhvfc") - .withExistingRegistry("qxepnylbfuaj", "yjt") - .withProperties(new ScopeMapProperties().withDescription("fmo") - .withActions(Arrays.asList("vwzjbhyz", "xjrk", "mbtrnegvmnvu"))) - .create(); - - Assertions.assertEquals("ziycslevufuztck", response.properties().description()); - Assertions.assertEquals("gzulwmmrqzzr", response.properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java deleted file mode 100644 index 7a327d04cd6e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScopeMapsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.scopeMaps().delete("l", "chp", "db", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java deleted file mode 100644 index c680cde6dd85..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScopeMapsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"description\":\"plmag\",\"type\":\"cyohpfkyrkdbd\",\"creationDate\":\"2021-11-23T10:21:46Z\",\"provisioningState\":\"Creating\",\"actions\":[\"kmnwqjnobaiyhddv\",\"acegfnmntf\"]},\"id\":\"vm\",\"name\":\"mfnczd\",\"type\":\"vvbalx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ScopeMap response = manager.scopeMaps() - .getWithResponse("vudtjuewbcihx", "uwhcjyxccybv", "ayakkudzpx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("plmag", response.properties().description()); - Assertions.assertEquals("kmnwqjnobaiyhddv", response.properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java deleted file mode 100644 index ee3e6ad5c775..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/ScopeMapsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.ScopeMap; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScopeMapsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"vlerchpqbmfpjba\",\"type\":\"idfcxsspuunnoxyh\",\"creationDate\":\"2021-03-12T10:30:45Z\",\"provisioningState\":\"Failed\",\"actions\":[\"rihpfhoq\",\"aaewdaomdjv\",\"pjxxkzb\",\"msgeivsiykzk\"]},\"id\":\"cjdx\",\"name\":\"nbzoggcu\",\"type\":\"apzwyrpgog\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.scopeMaps().list("evwrdnhfuk", "vsjcswsmystuluqy", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vlerchpqbmfpjba", response.iterator().next().properties().description()); - Assertions.assertEquals("rihpfhoq", response.iterator().next().properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java deleted file mode 100644 index 8e06cc605827..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SkuTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Sku; -import com.azure.resourcemanager.containerregistry.generated.models.SkuName; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"Classic\",\"tier\":\"Classic\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.CLASSIC, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.CLASSIC); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.CLASSIC, model.name()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java deleted file mode 100644 index 214e6703025d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SourceTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Source; -import org.junit.jupiter.api.Assertions; - -public final class SourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Source model - = BinaryData.fromString("{\"addr\":\"uhhziuiefozbhdm\",\"instanceID\":\"l\"}").toObject(Source.class); - Assertions.assertEquals("uhhziuiefozbhdm", model.addr()); - Assertions.assertEquals("l", model.instanceID()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java deleted file mode 100644 index ac752c4d4f79..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/StatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Status; - -public final class StatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Status model = BinaryData.fromString( - "{\"displayStatus\":\"svqwhbmdgbbjfd\",\"message\":\"mbmbexppbh\",\"timestamp\":\"2021-09-17T16:41:16Z\"}") - .toObject(Status.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java deleted file mode 100644 index b3a27f018f4b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/SyncUpdatePropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.SyncUpdateProperties; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class SyncUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SyncUpdateProperties model = BinaryData - .fromString( - "{\"schedule\":\"svlxotogtwrup\",\"syncWindow\":\"PT119H24M20S\",\"messageTtl\":\"PT72H58M15S\"}") - .toObject(SyncUpdateProperties.class); - Assertions.assertEquals("svlxotogtwrup", model.schedule()); - Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("svlxotogtwrup") - .withSyncWindow(Duration.parse("PT119H24M20S")) - .withMessageTtl(Duration.parse("PT72H58M15S")); - model = BinaryData.fromObject(model).toObject(SyncUpdateProperties.class); - Assertions.assertEquals("svlxotogtwrup", model.schedule()); - Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java deleted file mode 100644 index de6f81b8004b..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TargetTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.Target; -import org.junit.jupiter.api.Assertions; - -public final class TargetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Target model = BinaryData.fromString( - "{\"mediaType\":\"tlmngu\",\"size\":8390359388948965260,\"digest\":\"ldsyuuximerqfob\",\"length\":8923665884777818679,\"repository\":\"bykutw\",\"url\":\"hpagm\",\"tag\":\"skdsnfdsdoakg\",\"name\":\"lmkk\",\"version\":\"vdlhewpusdsttwv\"}") - .toObject(Target.class); - Assertions.assertEquals("tlmngu", model.mediaType()); - Assertions.assertEquals(8390359388948965260L, model.size()); - Assertions.assertEquals("ldsyuuximerqfob", model.digest()); - Assertions.assertEquals(8923665884777818679L, model.length()); - Assertions.assertEquals("bykutw", model.repository()); - Assertions.assertEquals("hpagm", model.url()); - Assertions.assertEquals("skdsnfdsdoakg", model.tag()); - Assertions.assertEquals("lmkk", model.name()); - Assertions.assertEquals("vdlhewpusdsttwv", model.version()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java deleted file mode 100644 index 89b275aa4c02..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsCertificatePropertiesTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.TlsCertificateProperties; - -public final class TlsCertificatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TlsCertificateProperties model = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"b\"}") - .toObject(TlsCertificateProperties.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java deleted file mode 100644 index 107a0bc9536c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TlsPropertiesTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.TlsProperties; - -public final class TlsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TlsProperties model = BinaryData - .fromString( - "{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"gnxytxhpzxbz\"}}") - .toObject(TlsProperties.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java deleted file mode 100644 index 60c1f5545a0d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokenPasswordTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.TokenPassword; -import com.azure.resourcemanager.containerregistry.generated.models.TokenPasswordName; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class TokenPasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TokenPassword model = BinaryData.fromString( - "{\"creationTime\":\"2021-01-13T20:24:26Z\",\"expiry\":\"2021-06-09T11:05:27Z\",\"name\":\"password2\",\"value\":\"tpngjcrcczsqpjh\"}") - .toObject(TokenPassword.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); - Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TokenPassword model = new TokenPassword().withCreationTime(OffsetDateTime.parse("2021-01-13T20:24:26Z")) - .withExpiry(OffsetDateTime.parse("2021-06-09T11:05:27Z")) - .withName(TokenPasswordName.PASSWORD2); - model = BinaryData.fromObject(model).toObject(TokenPassword.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); - Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java deleted file mode 100644 index a62fd97da183..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TokensDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TokensDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.tokens().delete("jazysdzhezwwvaiq", "uvvfonkp", "hqyikvy", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java deleted file mode 100644 index 341738f59d6c..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/TrustPolicyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.PolicyStatus; -import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicy; -import com.azure.resourcemanager.containerregistry.generated.models.TrustPolicyType; -import org.junit.jupiter.api.Assertions; - -public final class TrustPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrustPolicy model - = BinaryData.fromString("{\"type\":\"Notary\",\"status\":\"disabled\"}").toObject(TrustPolicy.class); - Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrustPolicy model = new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(TrustPolicy.class); - Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java deleted file mode 100644 index a1b8e18f62bb..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/UserIdentityPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.UserIdentityProperties; - -public final class UserIdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentityProperties model - = BinaryData.fromString("{\"principalId\":\"norcjxvsnbyxqab\",\"clientId\":\"ocpcy\"}") - .toObject(UserIdentityProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentityProperties model = new UserIdentityProperties(); - model = BinaryData.fromObject(model).toObject(UserIdentityProperties.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java deleted file mode 100644 index 9f357cf5f573..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookCreateParametersTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookCreateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebhookCreateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookCreateParameters model = BinaryData.fromString( - "{\"tags\":{\"bpodxunkbebxm\":\"kzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\",\"xe\":\"p\"},\"location\":\"mnzb\",\"properties\":{\"serviceUri\":\"hjpglkf\",\"customHeaders\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"status\":\"enabled\",\"scope\":\"cffgdkzzewk\",\"actions\":[\"push\",\"quarantine\"]}}") - .toObject(WebhookCreateParameters.class); - Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); - Assertions.assertEquals("mnzb", model.location()); - Assertions.assertEquals("hjpglkf", model.serviceUri()); - Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("cffgdkzzewk", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookCreateParameters model = new WebhookCreateParameters() - .withTags(mapOf("bpodxunkbebxm", "kzgxhurip", "oievseotgqrlltm", "byyntwlrbqt", "jefuzmuvpbttdumo", - "wlauwzizxbmpg", "xe", "p")) - .withLocation("mnzb") - .withServiceUri("hjpglkf") - .withCustomHeaders(mapOf("lfphsdyhtozfikd", "dneu", "zonosgg", "wwquuvxzxclvithh", "ljuti", "hcohfwdsjnk")) - .withStatus(WebhookStatus.ENABLED) - .withScope("cffgdkzzewk") - .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.QUARANTINE)); - model = BinaryData.fromObject(model).toObject(WebhookCreateParameters.class); - Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); - Assertions.assertEquals("mnzb", model.location()); - Assertions.assertEquals("hjpglkf", model.serviceUri()); - Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("cffgdkzzewk", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java deleted file mode 100644 index 6cbe5f26240d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import org.junit.jupiter.api.Assertions; - -public final class WebhookInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookInner model = BinaryData.fromString( - "{\"properties\":{\"status\":\"disabled\",\"scope\":\"fznudaodvxzb\",\"actions\":[\"chart_push\",\"delete\",\"chart_push\",\"push\"],\"provisioningState\":\"Canceled\"},\"location\":\"dbh\",\"tags\":{\"evfiwjmygt\":\"rzdzucerscdnt\",\"pyqs\":\"sslswtmweriof\",\"vwiwubmwmbesld\":\"mwabnetshhszhedp\",\"wtppjflcxogaoko\":\"k\"},\"id\":\"z\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}") - .toObject(WebhookInner.class); - Assertions.assertEquals("dbh", model.location()); - Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.properties().status()); - Assertions.assertEquals("fznudaodvxzb", model.properties().scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java deleted file mode 100644 index d4de9a95ef0d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookListResultTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.implementation.models.WebhookListResult; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import org.junit.jupiter.api.Assertions; - -public final class WebhookListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"status\":\"disabled\",\"scope\":\"rjxgciqib\",\"actions\":[\"push\"],\"provisioningState\":\"Failed\"},\"location\":\"dqrhzoymib\",\"tags\":{\"wfluszdt\":\"yiba\"},\"id\":\"hrkwo\",\"name\":\"yyv\",\"type\":\"qacpiex\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"wbwo\",\"actions\":[\"push\",\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"tdtkcn\",\"tags\":{\"i\":\"bpokulpiujwaasip\",\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\",\"h\":\"koymkcd\"},\"id\":\"pkkpw\",\"name\":\"reqnovvqfov\",\"type\":\"jxywsuws\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"sytgadgvraea\",\"actions\":[\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"arrwlquu\",\"tags\":{\"fpubjibwwi\":\"qkacewii\"},\"id\":\"tohqkvpuvksgp\",\"name\":\"saknynfsyn\",\"type\":\"jphuopxodlqi\"}],\"nextLink\":\"torzih\"}") - .toObject(WebhookListResult.class); - Assertions.assertEquals("dqrhzoymib", model.value().get(0).location()); - Assertions.assertEquals("yiba", model.value().get(0).tags().get("wfluszdt")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.value().get(0).properties().status()); - Assertions.assertEquals("rjxgciqib", model.value().get(0).properties().scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.value().get(0).properties().actions().get(0)); - Assertions.assertEquals("torzih", model.nextLink()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java deleted file mode 100644 index 9055950419d5..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesCreateParametersTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesCreateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebhookPropertiesCreateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookPropertiesCreateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"crailvpn\",\"customHeaders\":{\"hdlxyjrxsagafcn\":\"uflrwd\",\"apnedgfbcvkc\":\"hgw\",\"pkeqdcvdrhvoo\":\"q\"},\"status\":\"disabled\",\"scope\":\"bobzdopcjwvnhd\",\"actions\":[\"chart_delete\"]}") - .toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("crailvpn", model.serviceUri()); - Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("crailvpn") - .withCustomHeaders(mapOf("hdlxyjrxsagafcn", "uflrwd", "apnedgfbcvkc", "hgw", "pkeqdcvdrhvoo", "q")) - .withStatus(WebhookStatus.DISABLED) - .withScope("bobzdopcjwvnhd") - .withActions(Arrays.asList(WebhookAction.CHART_DELETE)); - model = BinaryData.fromObject(model).toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("crailvpn", model.serviceUri()); - Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java deleted file mode 100644 index b93f18b881e2..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookProperties; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import org.junit.jupiter.api.Assertions; - -public final class WebhookPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookProperties model = BinaryData.fromString( - "{\"status\":\"disabled\",\"scope\":\"gxtibqdxbxw\",\"actions\":[\"delete\",\"chart_delete\",\"delete\",\"delete\"],\"provisioningState\":\"Canceled\"}") - .toObject(WebhookProperties.class); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("gxtibqdxbxw", model.scope()); - Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java deleted file mode 100644 index 1a99ac01d457..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookPropertiesUpdateParametersTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.fluent.models.WebhookPropertiesUpdateParameters; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebhookPropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookPropertiesUpdateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"iyzvqtmnub\",\"customHeaders\":{\"mond\":\"pzk\",\"gkopkwhojvpajqgx\":\"mquxvypo\",\"qvmkcxo\":\"smocmbq\"},\"status\":\"disabled\",\"scope\":\"helxprglya\",\"actions\":[\"chart_push\",\"push\"]}") - .toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); - Assertions.assertEquals("pzk", model.customHeaders().get("mond")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("helxprglya", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("iyzvqtmnub") - .withCustomHeaders(mapOf("mond", "pzk", "gkopkwhojvpajqgx", "mquxvypo", "qvmkcxo", "smocmbq")) - .withStatus(WebhookStatus.DISABLED) - .withScope("helxprglya") - .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH)); - model = BinaryData.fromObject(model).toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); - Assertions.assertEquals("pzk", model.customHeaders().get("mond")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("helxprglya", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java deleted file mode 100644 index 8af5c15cd46d..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhookUpdateParametersTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookUpdateParameters; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebhookUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebhookUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"mutwuoe\":\"xcxrsl\"},\"properties\":{\"serviceUri\":\"khjwn\",\"customHeaders\":{\"vmbmp\":\"sluicpdggkzz\",\"uefywsbpfvmwy\":\"xmodf\"},\"status\":\"enabled\",\"scope\":\"uyfta\",\"actions\":[\"quarantine\"]}}") - .toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); - Assertions.assertEquals("khjwn", model.serviceUri()); - Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("uyfta", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebhookUpdateParameters model = new WebhookUpdateParameters().withTags(mapOf("mutwuoe", "xcxrsl")) - .withServiceUri("khjwn") - .withCustomHeaders(mapOf("vmbmp", "sluicpdggkzz", "uefywsbpfvmwy", "xmodf")) - .withStatus(WebhookStatus.ENABLED) - .withScope("uyfta") - .withActions(Arrays.asList(WebhookAction.QUARANTINE)); - model = BinaryData.fromObject(model).toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); - Assertions.assertEquals("khjwn", model.serviceUri()); - Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("uyfta", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java deleted file mode 100644 index db164bf7c3e3..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksCreateMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -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 reactor.core.publisher.Mono; - -public final class WebhooksCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"status\":\"disabled\",\"scope\":\"ealzxwhcansymoyq\",\"actions\":[\"delete\",\"chart_delete\",\"delete\"],\"provisioningState\":\"Succeeded\"},\"location\":\"bkbxgomfa\",\"tags\":{\"e\":\"asqvd\",\"uxakjsqzhzbezk\":\"y\",\"kgfmocwahpq\":\"imsidxasicddyvvj\"},\"id\":\"atjeaahh\",\"name\":\"jhhn\",\"type\":\"kzyb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Webhook response = manager.webhooks() - .define("uzjyihsasbhudypo") - .withRegion("hqlyvijo") - .withExistingRegistry("hvvmuvgpmun", "qsxvmhf") - .withTags(mapOf("oobrlttyms", "emslynsqyrp", "nfwqzdzgtilaxhn", "nygq")) - .withServiceUri("iv") - .withCustomHeaders( - mapOf("pwpgclrci", "yzunbixxrtikv", "frkenxpmyyefrp", "tso", "pqfrtqlkz", "pdnqqskawaoqvmmb")) - .withStatus(WebhookStatus.DISABLED) - .withScope("itgvkx") - .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH, WebhookAction.PUSH, - WebhookAction.QUARANTINE)) - .create(); - - Assertions.assertEquals("bkbxgomfa", response.location()); - Assertions.assertEquals("asqvd", response.tags().get("e")); - Assertions.assertEquals(WebhookStatus.DISABLED, response.properties().status()); - Assertions.assertEquals("ealzxwhcansymoyq", response.properties().scope()); - Assertions.assertEquals(WebhookAction.DELETE, response.properties().actions().get(0)); - } - - // Use "Map.of" if available - @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/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java deleted file mode 100644 index ff807052aa97..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebhooksDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.webhooks().delete("nzeyqxtjj", "zqlqhyc", "vodggxdbee", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java deleted file mode 100644 index 8290f6504732..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetCallbackConfigWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.CallbackConfig; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebhooksGetCallbackConfigWithResponseMockTests { - @Test - public void testGetCallbackConfigWithResponse() throws Exception { - String responseStr - = "{\"serviceUri\":\"qvlgafcqusrdvetn\",\"customHeaders\":{\"ewipm\":\"tutnwlduycvuzhyr\",\"gsjj\":\"ekdxuku\",\"hhzjhfj\":\"undxgketw\"}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - CallbackConfig response = manager.webhooks() - .getCallbackConfigWithResponse("uvyinzqodfvpgs", "oxgsgbpfgzdjtx", "zflbqvg", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qvlgafcqusrdvetn", response.serviceUri()); - Assertions.assertEquals("tutnwlduycvuzhyr", response.customHeaders().get("ewipm")); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java deleted file mode 100644 index 33c1a3609153..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebhooksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"status\":\"disabled\",\"scope\":\"g\",\"actions\":[\"chart_delete\",\"chart_delete\",\"quarantine\",\"chart_delete\"],\"provisioningState\":\"Canceled\"},\"location\":\"ffwafq\",\"tags\":{\"unzo\":\"daspavehhrvk\",\"cxgkmoyxcdyui\":\"ud\",\"aeoisrvh\":\"hmfdnbzydvfvfcj\"},\"id\":\"gorf\",\"name\":\"ukiscvwmzhw\",\"type\":\"lefaxvxilcbtgn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Webhook response - = manager.webhooks().getWithResponse("fmzzsdymbrny", "u", "m", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("ffwafq", response.location()); - Assertions.assertEquals("daspavehhrvk", response.tags().get("unzo")); - Assertions.assertEquals(WebhookStatus.DISABLED, response.properties().status()); - Assertions.assertEquals("g", response.properties().scope()); - Assertions.assertEquals(WebhookAction.CHART_DELETE, response.properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java deleted file mode 100644 index 91b193977ca8..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksListMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.Webhook; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookAction; -import com.azure.resourcemanager.containerregistry.generated.models.WebhookStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebhooksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"status\":\"enabled\",\"scope\":\"fgiagtcojocqwo\",\"actions\":[\"delete\",\"delete\",\"chart_push\"],\"provisioningState\":\"Updating\"},\"location\":\"fzldmozu\",\"tags\":{\"ysownbtgkbug\":\"fsbtkad\",\"pe\":\"jqctojcmisofie\",\"hihihlhzdsqtzbsr\":\"ojyqdhcuplcplcw\",\"hfgmvecactxm\":\"nowc\"},\"id\":\"oteyowc\",\"name\":\"uqovekqvgqouwif\",\"type\":\"mpjw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.webhooks().list("mieknlraria", "wiuagydwqf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fzldmozu", response.iterator().next().location()); - Assertions.assertEquals("fsbtkad", response.iterator().next().tags().get("ysownbtgkbug")); - Assertions.assertEquals(WebhookStatus.ENABLED, response.iterator().next().properties().status()); - Assertions.assertEquals("fgiagtcojocqwo", response.iterator().next().properties().scope()); - Assertions.assertEquals(WebhookAction.DELETE, response.iterator().next().properties().actions().get(0)); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java deleted file mode 100644 index 68cd8bb03dac..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/src/test/java/com/azure/resourcemanager/containerregistry/generated/generated/WebhooksPingWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.generated.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerregistry.generated.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.generated.models.EventInfo; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebhooksPingWithResponseMockTests { - @Test - public void testPingWithResponse() throws Exception { - String responseStr = "{\"id\":\"vyklxuby\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerRegistryManager manager = ContainerRegistryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EventInfo response = manager.webhooks() - .pingWithResponse("ivqikfxcvhr", "sphuagrttikteus", "c", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vyklxuby", response.id()); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml deleted file mode 100644 index c401729cef54..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry-generated/tsp-location.yaml +++ /dev/null @@ -1,4 +0,0 @@ -directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry -commit: eb320d1d85f5b46c3cfe6cf60a1f0de4ef3b01d9 -repo: Azure/azure-rest-api-specs -additionalDirectories: diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 6a18051e47df..99040f2dc72c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0 (Unreleased) +## 2.55.0-beta.2 (Unreleased) ### Breaking Changes diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md index d8d02d6d5f38..b565d807f7f0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.55.0-beta.2 + 2.53.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerregistry/ci.yml b/sdk/containerregistry/ci.yml index c728f99b38b8..8ae2003205f3 100644 --- a/sdk/containerregistry/ci.yml +++ b/sdk/containerregistry/ci.yml @@ -38,22 +38,18 @@ pr: - sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml parameters: - - name: release_dependsonlivetests - displayName: Release depends on live tests - type: boolean - default: true - - name: release_azurecontainerscontainerregistry - displayName: azure-containers-containerregistry - type: boolean - default: true - - name: release_azureresourcemanagercontainerregistry - displayName: azure-resourcemanager-containerregistry - type: boolean - default: false - - name: release_azureresourcemanagercontainerregistrygenerated - displayName: azure-resourcemanager-containerregistry-generated - type: boolean - default: false +- name: release_dependsonlivetests + displayName: 'Release depends on live tests' + type: boolean + default: true +- name: release_azurecontainerscontainerregistry + displayName: 'azure-containers-containerregistry' + type: boolean + default: true +- name: release_azureresourcemanagercontainerregistry + displayName: 'azure-resourcemanager-containerregistry' + type: boolean + default: false extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -68,12 +64,9 @@ extends: groupId: com.azure.resourcemanager safeName: azureresourcemanagercontainerregistry releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerregistry }} - - name: azure-resourcemanager-containerregistry-generated - groupId: com.azure.resourcemanager - safeName: azureresourcemanagercontainerregistrygenerated - releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerregistrygenerated }} AdditionalModules: - name: azure-containers-containerregistry-perf groupId: com.azure + # required by the above perf library - name: perf-test-core groupId: com.azure diff --git a/sdk/containerregistry/pom.xml b/sdk/containerregistry/pom.xml index 47c38aa10164..75c9894e38f6 100644 --- a/sdk/containerregistry/pom.xml +++ b/sdk/containerregistry/pom.xml @@ -12,6 +12,5 @@ azure-containers-containerregistry azure-containers-containerregistry-perf azure-resourcemanager-containerregistry - azure-resourcemanager-containerregistry-generated From 4362e10e3838537b18f1baf0b7bd2dd31ea519f9 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 22 Jan 2026 07:39:21 +0000 Subject: [PATCH 03/16] Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2025-11-01, SDK Release Type: stable, and CommitSHA: '926d47e176855de8c16d39bde587afe25cb1f20d' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5783590 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 3 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 192 +- .../README.md | 2 +- .../pom.xml | 2 +- .../fluent/CacheRulesClient.java | 88 +- .../fluent/ConnectedRegistriesClient.java | 130 +- .../ContainerRegistryManagementClient.java | 32 +- .../fluent/CredentialSetsClient.java | 88 +- .../fluent/OperationsClient.java | 2 +- .../PrivateEndpointConnectionsClient.java | 88 +- .../fluent/RegistriesClient.java | 521 +++-- .../fluent/ReplicationsClient.java | 88 +- .../fluent/ScopeMapsClient.java | 88 +- .../fluent/TokensClient.java | 88 +- .../fluent/WebhooksClient.java | 148 +- .../fluent/models/CacheRuleInner.java | 2 +- .../fluent/models/CacheRuleProperties.java | 2 +- .../models/CacheRuleUpdateProperties.java | 2 +- .../fluent/models/CallbackConfigInner.java | 30 +- .../fluent/models/ConnectedRegistryInner.java | 2 +- .../models/ConnectedRegistryProperties.java | 2 +- .../ConnectedRegistryUpdateProperties.java | 2 +- .../fluent/models/CredentialSetInner.java | 2 +- .../models/CredentialSetProperties.java | 2 +- .../models/CredentialSetUpdateProperties.java | 2 +- .../fluent/models/EventInfoInner.java | 10 +- .../fluent/models/EventInner.java | 44 +- .../GenerateCredentialsResultInner.java | 30 +- .../models/OperationDefinitionInner.java | 69 +- .../models/OperationPropertiesDefinition.java | 20 +- .../PrivateEndpointConnectionInner.java | 2 +- .../PrivateEndpointConnectionProperties.java | 2 +- .../models/PrivateLinkResourceInner.java | 26 +- .../models/PrivateLinkResourceProperties.java | 19 +- .../fluent/models/RegistryInner.java | 27 +- .../RegistryListCredentialsResultInner.java | 30 +- .../models/RegistryNameStatusInner.java | 74 +- .../fluent/models/RegistryProperties.java | 34 +- .../RegistryPropertiesUpdateParameters.java | 2 +- .../models/RegistryUsageListResultInner.java | 19 +- .../fluent/models/ReplicationInner.java | 2 +- .../fluent/models/ReplicationProperties.java | 2 +- ...ReplicationUpdateParametersProperties.java | 2 +- .../fluent/models/ScopeMapInner.java | 2 +- .../fluent/models/ScopeMapProperties.java | 2 +- .../ScopeMapPropertiesUpdateParameters.java | 2 +- .../fluent/models/TokenInner.java | 2 +- .../fluent/models/TokenProperties.java | 2 +- .../fluent/models/TokenUpdateProperties.java | 2 +- .../fluent/models/WebhookInner.java | 2 +- .../fluent/models/WebhookProperties.java | 2 +- .../WebhookPropertiesCreateParameters.java | 2 +- .../WebhookPropertiesUpdateParameters.java | 2 +- .../fluent/models/package-info.java | 4 +- .../fluent/package-info.java | 4 +- .../implementation/CacheRulesClientImpl.java | 362 ++-- .../ConnectedRegistriesClientImpl.java | 449 +++-- ...tainerRegistryManagementClientBuilder.java | 28 +- ...ContainerRegistryManagementClientImpl.java | 70 +- .../CredentialSetsClientImpl.java | 364 ++-- .../implementation/OperationsClientImpl.java | 10 +- .../PrivateEndpointConnectionsClientImpl.java | 350 ++-- .../implementation/RegistriesClientImpl.java | 1752 +++++++++-------- .../ReplicationsClientImpl.java | 362 ++-- .../implementation/ScopeMapsClientImpl.java | 360 ++-- .../implementation/TokensClientImpl.java | 361 ++-- .../implementation/WebhooksClientImpl.java | 480 ++--- .../models/CacheRulesListResult.java | 33 +- .../models/ConnectedRegistryListResult.java | 33 +- .../models/CredentialSetListResult.java | 33 +- .../models/EventListResult.java | 33 +- .../models/OperationListResult.java | 33 +- .../PrivateEndpointConnectionListResult.java | 33 +- .../models/PrivateLinkResourceListResult.java | 33 +- .../models/RegistryListResult.java | 33 +- .../models/ReplicationListResult.java | 33 +- .../models/ScopeMapListResult.java | 33 +- .../models/TokenListResult.java | 33 +- .../models/WebhookListResult.java | 33 +- .../containerregistry/models/Action.java | 2 +- .../models/ActionsRequired.java | 2 +- .../models/ActivationProperties.java | 4 +- .../models/ActivationStatus.java | 2 +- .../containerregistry/models/Actor.java | 19 +- .../models/AuditLogStatus.java | 2 +- .../models/AuthCredential.java | 2 +- .../AutoGeneratedDomainNameLabelScope.java | 66 - .../AzureADAuthenticationAsArmPolicy.java | 2 +- ...zureADAuthenticationAsArmPolicyStatus.java | 2 +- .../models/CacheRuleUpdateParameters.java | 2 +- .../models/CertificateType.java | 2 +- .../models/ConnectedRegistryMode.java | 2 +- .../ConnectedRegistryUpdateParameters.java | 2 +- .../models/ConnectionState.java | 2 +- .../models/ConnectionStatus.java | 2 +- .../models/ContainerRegistryResourceType.java | 51 + .../models/CredentialHealth.java | 41 +- .../models/CredentialHealthStatus.java | 2 +- .../models/CredentialName.java | 2 +- .../models/CredentialSetUpdateParameters.java | 2 +- .../models/DefaultAction.java | 2 +- .../models/EncryptionProperty.java | 2 +- .../models/EncryptionStatus.java | 2 +- .../models/EventContent.java | 87 +- .../models/EventRequestMessage.java | 63 +- .../models/EventResponseMessage.java | 63 +- .../models/ExportPolicy.java | 2 +- .../models/ExportPolicyStatus.java | 2 +- .../models/GarbageCollectionProperties.java | 2 +- .../models/GenerateCredentialsParameters.java | 2 +- .../models/IdentityProperties.java | 2 +- .../models/ImportImageParameters.java | 2 +- .../containerregistry/models/ImportMode.java | 2 +- .../models/ImportSource.java | 2 +- .../models/ImportSourceCredentials.java | 2 +- .../containerregistry/models/IpRule.java | 2 +- .../models/KeyVaultProperties.java | 2 +- .../containerregistry/models/LogLevel.java | 2 +- .../models/LoggingProperties.java | 2 +- .../models/LoginServerProperties.java | 2 +- .../models/NetworkRuleBypassOptions.java | 2 +- .../models/NetworkRuleSet.java | 2 +- .../models/OperationDisplayDefinition.java | 52 +- .../OperationLogSpecificationDefinition.java | 41 +- ...perationMetricSpecificationDefinition.java | 74 +- ...erationServiceSpecificationDefinition.java | 32 +- .../models/ParentProperties.java | 2 +- .../models/PasswordName.java | 2 +- .../containerregistry/models/Policies.java | 2 +- .../models/PolicyStatus.java | 2 +- .../models/PrivateEndpoint.java | 2 +- .../PrivateLinkServiceConnectionState.java | 2 +- .../models/ProvisioningState.java | 2 +- .../models/PublicNetworkAccess.java | 2 +- .../models/QuarantinePolicy.java | 2 +- .../RegenerateCredentialParameters.java | 2 +- .../models/RegistryNameCheckRequest.java | 74 +- .../models/RegistryPassword.java | 30 +- .../models/RegistryUpdateParameters.java | 2 +- .../models/RegistryUsage.java | 52 +- .../models/RegistryUsageUnit.java | 2 +- .../models/ReplicationUpdateParameters.java | 2 +- .../containerregistry/models/Request.java | 65 +- .../models/ResourceIdentityType.java | 2 +- .../models/RetentionPolicy.java | 2 +- .../models/RoleAssignmentMode.java | 2 +- .../models/ScopeMapUpdateParameters.java | 2 +- .../containerregistry/models/Sku.java | 2 +- .../containerregistry/models/SkuName.java | 2 +- .../containerregistry/models/SkuTier.java | 2 +- .../containerregistry/models/Source.java | 45 +- .../containerregistry/models/Status.java | 4 +- .../models/StatusDetailProperties.java | 4 +- .../models/SyncProperties.java | 2 +- .../models/SyncUpdateProperties.java | 2 +- .../containerregistry/models/Target.java | 107 +- .../models/TlsCertificateProperties.java | 4 +- .../models/TlsProperties.java | 4 +- .../containerregistry/models/TlsStatus.java | 2 +- .../models/TokenCertificate.java | 2 +- .../models/TokenCertificateName.java | 2 +- .../models/TokenCredentialsProperties.java | 2 +- .../models/TokenPassword.java | 2 +- .../models/TokenPasswordName.java | 2 +- .../containerregistry/models/TokenStatus.java | 2 +- .../models/TokenUpdateParameters.java | 2 +- .../containerregistry/models/TrustPolicy.java | 2 +- .../models/TrustPolicyType.java | 2 +- .../models/UserIdentityProperties.java | 2 +- .../models/WebhookAction.java | 2 +- .../models/WebhookCreateParameters.java | 2 +- .../models/WebhookStatus.java | 2 +- .../models/WebhookUpdateParameters.java | 2 +- .../models/ZoneRedundancy.java | 2 +- .../models/package-info.java | 4 +- .../containerregistry/package-info.java | 4 +- ...rcemanager-containerregistry_metadata.json | 1 + .../proxy-config.json | 1 - .../reflect-config.json | 1 - .../generated/ActivationPropertiesTests.java | 16 + .../generated/ActorTests.java | 17 + ...AzureADAuthenticationAsArmPolicyTests.java | 27 + .../generated/CallbackConfigInnerTests.java | 20 + .../generated/EventContentTests.java | 39 + .../generated/EventInfoInnerTests.java | 17 + .../generated/EventRequestMessageTests.java | 43 + .../generated/ExportPolicyTests.java | 25 + .../GarbageCollectionPropertiesTests.java | 28 + .../generated/IdentityPropertiesTests.java | 44 + .../generated/IpRuleTests.java | 27 + .../generated/LoggingPropertiesTests.java | 30 + .../generated/LoginServerPropertiesTests.java | 23 + .../generated/NetworkRuleSetTests.java | 35 + .../OperationDefinitionInnerTests.java | 36 + .../OperationDisplayDefinitionTests.java | 22 + .../generated/OperationListResultTests.java | 26 + ...rationLogSpecificationDefinitionTests.java | 21 + ...ionMetricSpecificationDefinitionTests.java | 24 + .../OperationPropertiesDefinitionTests.java | 30 + ...onServiceSpecificationDefinitionTests.java | 27 + .../generated/PoliciesTests.java | 54 + .../PrivateEndpointConnectionInnerTests.java | 41 + ...vateEndpointConnectionListResultTests.java | 27 + ...vateEndpointConnectionPropertiesTests.java | 41 + .../generated/PrivateEndpointTests.java | 24 + .../PrivateLinkResourceInnerTests.java | 19 + .../PrivateLinkResourceListResultTests.java | 20 + .../PrivateLinkResourcePropertiesTests.java | 19 + ...rivateLinkServiceConnectionStateTests.java | 35 + .../generated/QuarantinePolicyTests.java | 25 + .../RegenerateCredentialParametersTests.java | 26 + .../RegistryNameCheckRequestTests.java | 30 + .../RegistryNameStatusInnerTests.java | 21 + .../generated/RegistryPasswordTests.java | 20 + .../RegistryUsageListResultInnerTests.java | 23 + .../generated/RegistryUsageTests.java | 23 + .../generated/ReplicationInnerTests.java | 50 + .../generated/ReplicationListResultTests.java | 24 + .../generated/ReplicationPropertiesTests.java | 30 + ...cationUpdateParametersPropertiesTests.java | 26 + .../ReplicationUpdateParametersTests.java | 43 + .../generated/RequestTests.java | 23 + .../generated/RetentionPolicyTests.java | 29 + .../generated/ScopeMapInnerTests.java | 29 + .../generated/ScopeMapListResultTests.java | 21 + .../generated/ScopeMapPropertiesTests.java | 30 + ...opeMapPropertiesUpdateParametersTests.java | 30 + .../ScopeMapUpdateParametersTests.java | 30 + .../containerregistry/generated/SkuTests.java | 25 + .../generated/SourceTests.java | 19 + .../generated/StatusTests.java | 17 + .../generated/SyncUpdatePropertiesTests.java | 34 + .../generated/TargetTests.java | 27 + .../TlsCertificatePropertiesTests.java | 16 + .../generated/TlsPropertiesTests.java | 18 + .../generated/TokenPasswordTests.java | 34 + .../generated/TrustPolicyTests.java | 29 + .../UserIdentityPropertiesTests.java | 23 + .../WebhookCreateParametersTests.java | 63 + .../generated/WebhookInnerTests.java | 57 + .../generated/WebhookListResultTests.java | 26 + ...ebhookPropertiesCreateParametersTests.java | 55 + .../generated/WebhookPropertiesTests.java | 36 + ...ebhookPropertiesUpdateParametersTests.java | 55 + .../WebhookUpdateParametersTests.java | 58 + .../tsp-location.yaml | 4 + .../azure-resourcemanager/pom.xml | 2 +- .../generated/CacheRulesCreateSamples.java | 6 +- .../generated/CacheRulesDeleteSamples.java | 6 +- .../generated/CacheRulesGetSamples.java | 6 +- .../generated/CacheRulesListSamples.java | 6 +- .../generated/CacheRulesUpdateSamples.java | 6 +- .../ConnectedRegistriesCreateSamples.java | 6 +- .../ConnectedRegistriesDeactivateSamples.java | 6 +- .../ConnectedRegistriesDeleteSamples.java | 6 +- .../ConnectedRegistriesGetSamples.java | 6 +- .../ConnectedRegistriesListSamples.java | 6 +- .../ConnectedRegistriesUpdateSamples.java | 6 +- .../CredentialSetsCreateSamples.java | 6 +- .../CredentialSetsDeleteSamples.java | 6 +- .../generated/CredentialSetsGetSamples.java | 6 +- .../generated/CredentialSetsListSamples.java | 6 +- .../CredentialSetsUpdateSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- ...pointConnectionsCreateOrUpdateSamples.java | 6 +- ...ivateEndpointConnectionsDeleteSamples.java | 6 +- .../PrivateEndpointConnectionsGetSamples.java | 6 +- ...PrivateEndpointConnectionsListSamples.java | 6 +- ...egistriesCheckNameAvailabilitySamples.java | 19 +- .../generated/RegistriesCreateSamples.java | 14 +- .../generated/RegistriesDeleteSamples.java | 6 +- .../RegistriesGenerateCredentialsSamples.java | 6 +- .../RegistriesGetByResourceGroupSamples.java | 6 +- ...gistriesGetPrivateLinkResourceSamples.java | 6 +- .../RegistriesImportImageSamples.java | 14 +- .../RegistriesListByResourceGroupSamples.java | 6 +- .../RegistriesListCredentialsSamples.java | 6 +- ...striesListPrivateLinkResourcesSamples.java | 6 +- .../generated/RegistriesListSamples.java | 6 +- .../RegistriesListUsagesSamples.java | 6 +- ...RegistriesRegenerateCredentialSamples.java | 6 +- .../generated/RegistriesUpdateSamples.java | 6 +- .../generated/ReplicationsCreateSamples.java | 10 +- .../generated/ReplicationsDeleteSamples.java | 6 +- .../generated/ReplicationsGetSamples.java | 6 +- .../generated/ReplicationsListSamples.java | 6 +- .../generated/ReplicationsUpdateSamples.java | 6 +- .../generated/ScopeMapsCreateSamples.java | 6 +- .../generated/ScopeMapsDeleteSamples.java | 6 +- .../generated/ScopeMapsGetSamples.java | 6 +- .../generated/ScopeMapsListSamples.java | 6 +- .../generated/ScopeMapsUpdateSamples.java | 6 +- .../generated/TokensCreateSamples.java | 6 +- .../generated/TokensDeleteSamples.java | 6 +- .../generated/TokensGetSamples.java | 6 +- .../generated/TokensListSamples.java | 6 +- .../generated/TokensUpdateSamples.java | 6 +- .../generated/WebhooksCreateSamples.java | 6 +- .../generated/WebhooksDeleteSamples.java | 6 +- .../WebhooksGetCallbackConfigSamples.java | 6 +- .../generated/WebhooksGetSamples.java | 6 +- .../generated/WebhooksListEventsSamples.java | 6 +- .../generated/WebhooksListSamples.java | 6 +- .../generated/WebhooksPingSamples.java | 6 +- .../generated/WebhooksUpdateSamples.java | 6 +- 307 files changed, 5827 insertions(+), 5079 deletions(-) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/CacheRulesListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/ConnectedRegistryListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/CredentialSetListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/EventListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/OperationListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/PrivateEndpointConnectionListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/PrivateLinkResourceListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/RegistryListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/ReplicationListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/ScopeMapListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/TokenListResult.java (77%) rename sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/{ => implementation}/models/WebhookListResult.java (77%) delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AutoGeneratedDomainNameLabelScope.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActivationPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/AzureADAuthenticationAsArmPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ExportPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IdentityPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IpRuleTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/NetworkRuleSetTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDefinitionInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDisplayDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationLogSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationMetricSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationPropertiesDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationServiceSpecificationDefinitionTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PoliciesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/QuarantinePolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegenerateCredentialParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryPasswordTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageListResultInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RetentionPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SkuTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/StatusTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TokenPasswordTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TrustPolicyTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/UserIdentityPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 83a1758d6b01..8f56ac639cde 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -280,7 +280,7 @@ com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.56.0;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0 com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.58.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 @@ -553,6 +553,7 @@ unreleased_com.azure.v2:azure-core;2.0.0-beta.1 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 +unreleased_com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.55.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml index 8bba6ac50e88..6d872e708d03 100644 --- a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml +++ b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml @@ -53,7 +53,7 @@ com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.55.0-beta.2 + 2.55.0 com.azure diff --git a/sdk/containerregistry/azure-containers-containerregistry/pom.xml b/sdk/containerregistry/azure-containers-containerregistry/pom.xml index bd3e043f943e..292e6b80c81a 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/pom.xml +++ b/sdk/containerregistry/azure-containers-containerregistry/pom.xml @@ -69,7 +69,7 @@ com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.55.0-beta.2 + 2.55.0 test diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 99040f2dc72c..ed49eff7e16f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,17 +1,193 @@ # Release History -## 2.55.0-beta.2 (Unreleased) +## 2.55.0 (2026-01-22) ### Breaking Changes -#### Changes to `ContainerRegistryManagementClient` Class +#### `models.OperationListResult` was removed -- Moved `ContainerRegistryManager.serviceClient().getAgentPools()` to `ContainerRegistryManager.taskClient().getAgentPools()`. -- Moved `ContainerRegistryManager.serviceClient().getRuns()` to `ContainerRegistryManager.taskClient().getRuns()`. -- Moved `ContainerRegistryManager.serviceClient().getTaskRuns()` to `ContainerRegistryManager.taskClient().getTaskRuns()`. -- Moved `ContainerRegistryManager.serviceClient().getTasks()` to `ContainerRegistryManager.taskClient().getTasks()`. -- Moved `ContainerRegistryManager.serviceClient().getRegistries().scheduleRun(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().scheduleRun(...)`. -- Moved `ContainerRegistryManager.serviceClient().getRegistries().getBuildSourceUploadUrl(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().getBuildSourceUploadUrl(...)`. +#### `models.TokenListResult` was removed + +#### `models.ConnectedRegistryListResult` was removed + +#### `models.ReplicationListResult` was removed + +#### `models.RegistryListResult` was removed + +#### `models.CredentialSetListResult` was removed + +#### `models.PrivateEndpointConnectionListResult` was removed + +#### `models.EventListResult` was removed + +#### `models.AutoGeneratedDomainNameLabelScope` was removed + +#### `models.ScopeMapListResult` was removed + +#### `models.WebhookListResult` was removed + +#### `models.PrivateLinkResourceListResult` was removed + +#### `models.CacheRulesListResult` was removed + +#### `models.OperationMetricSpecificationDefinition` was modified + +* `OperationMetricSpecificationDefinition()` was changed to private access +* `withAggregationType(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withUnit(java.lang.String)` was removed +* `withDisplayDescription(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `withInternalMetricName(java.lang.String)` was removed + +#### `models.TlsProperties` was modified + +* `TlsProperties()` was changed to private access + +#### `models.RegistryPassword` was modified + +* `RegistryPassword()` was changed to private access +* `withName(models.PasswordName)` was removed +* `withValue(java.lang.String)` was removed + +#### `models.TlsCertificateProperties` was modified + +* `TlsCertificateProperties()` was changed to private access + +#### `models.Target` was modified + +* `Target()` was changed to private access +* `withMediaType(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `withUrl(java.lang.String)` was removed +* `withDigest(java.lang.String)` was removed +* `withTag(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withSize(java.lang.Long)` was removed +* `withLength(java.lang.Long)` was removed +* `withRepository(java.lang.String)` was removed + +#### `models.StatusDetailProperties` was modified + +* `StatusDetailProperties()` was changed to private access + +#### `models.Status` was modified + +* `Status()` was changed to private access + +#### `models.OperationServiceSpecificationDefinition` was modified + +* `OperationServiceSpecificationDefinition()` was changed to private access +* `withLogSpecifications(java.util.List)` was removed +* `withMetricSpecifications(java.util.List)` was removed + +#### `models.Actor` was modified + +* `Actor()` was changed to private access +* `withName(java.lang.String)` was removed + +#### `models.Source` was modified + +* `Source()` was changed to private access +* `withAddr(java.lang.String)` was removed +* `instanceId()` was removed +* `withInstanceId(java.lang.String)` was removed + +#### `models.RegistryNameCheckRequest` was modified + +* `resourceGroupName()` was removed +* `withResourceGroupName(java.lang.String)` was removed +* `java.lang.String type()` -> `models.ContainerRegistryResourceType type()` +* `autoGeneratedDomainNameLabelScope()` was removed +* `withAutoGeneratedDomainNameLabelScope(models.AutoGeneratedDomainNameLabelScope)` was removed + +#### `models.RegistryUsage` was modified + +* `RegistryUsage()` was changed to private access +* `withLimit(java.lang.Long)` was removed +* `withCurrentValue(java.lang.Long)` was removed +* `withName(java.lang.String)` was removed +* `withUnit(models.RegistryUsageUnit)` was removed + +#### `models.EventResponseMessage` was modified + +* `EventResponseMessage()` was changed to private access +* `withReasonPhrase(java.lang.String)` was removed +* `withHeaders(java.util.Map)` was removed +* `withStatusCode(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withContent(java.lang.String)` was removed + +#### `models.EventContent` was modified + +* `EventContent()` was changed to private access +* `withSource(models.Source)` was removed +* `withTimestamp(java.time.OffsetDateTime)` was removed +* `withRequest(models.Request)` was removed +* `withId(java.lang.String)` was removed +* `withActor(models.Actor)` was removed +* `withAction(java.lang.String)` was removed +* `withTarget(models.Target)` was removed + +#### `models.OperationDisplayDefinition` was modified + +* `OperationDisplayDefinition()` was changed to private access +* `withDescription(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed + +#### `models.ActivationProperties` was modified + +* `ActivationProperties()` was changed to private access + +#### `models.EventRequestMessage` was modified + +* `EventRequestMessage()` was changed to private access +* `withContent(models.EventContent)` was removed +* `withHeaders(java.util.Map)` was removed +* `withMethod(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withRequestUri(java.lang.String)` was removed + +#### `models.CredentialHealth` was modified + +* `CredentialHealth()` was changed to private access +* `withStatus(models.CredentialHealthStatus)` was removed +* `withErrorCode(java.lang.String)` was removed +* `withErrorMessage(java.lang.String)` was removed + +#### `models.OperationLogSpecificationDefinition` was modified + +* `OperationLogSpecificationDefinition()` was changed to private access +* `withBlobDuration(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withName(java.lang.String)` was removed + +#### `models.Request` was modified + +* `Request()` was changed to private access +* `withMethod(java.lang.String)` was removed +* `withUseragent(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `withAddr(java.lang.String)` was removed +* `withHost(java.lang.String)` was removed + +### Features Added + +* `models.ContainerRegistryResourceType` was added + +#### `models.Source` was modified + +* `instanceID()` was added + +#### `models.RegistryNameCheckRequest` was modified + +* `withType(models.ContainerRegistryResourceType)` was added + +#### `ContainerRegistryManager` was modified + +* `taskClient()` was added ## 2.55.0-beta.1 (2025-12-04) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md index b565d807f7f0..059df1bcdc75 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.53.1 + 2.55.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml b/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml index a34636f5cf53..61f7430ed5f0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.55.0-beta.2 + 2.55.0 jar Microsoft Azure SDK for Container Registry Management diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java index a3de718b1fd7..aad8e354c12e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,49 +23,6 @@ * An instance of this class provides access to all the operations defined in CacheRulesClient. */ public interface CacheRulesClient { - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified cache rule resource. * @@ -456,4 +413,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java index f4b3de8c146c..23716a280cca 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,70 +23,6 @@ * An instance of this class provides access to all the operations defined in ConnectedRegistriesClient. */ public interface ConnectedRegistriesClient { - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName, String filter); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context); - /** * Gets the properties of the connected registry. * @@ -491,6 +427,70 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String connectedRegistryName, Context context); + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName, String filter); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context); + /** * Deactivates the connected registry instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java index 50dedcbc938a..d4400f824714 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -12,26 +12,26 @@ */ public interface ContainerRegistryManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -68,18 +68,18 @@ public interface ContainerRegistryManagementClient { CacheRulesClient getCacheRules(); /** - * Gets the ConnectedRegistriesClient object to access its operations. + * Gets the CredentialSetsClient object to access its operations. * - * @return the ConnectedRegistriesClient object. + * @return the CredentialSetsClient object. */ - ConnectedRegistriesClient getConnectedRegistries(); + CredentialSetsClient getCredentialSets(); /** - * Gets the CredentialSetsClient object to access its operations. + * Gets the ConnectedRegistriesClient object to access its operations. * - * @return the CredentialSetsClient object. + * @return the ConnectedRegistriesClient object. */ - CredentialSetsClient getCredentialSets(); + ConnectedRegistriesClient getConnectedRegistries(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java index be9a1d1ed3fb..295effb83924 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,49 +23,6 @@ * An instance of this class provides access to all the operations defined in CredentialSetsClient. */ public interface CredentialSetsClient { - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified credential set resource. * @@ -467,4 +424,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java index c8bca7fba501..aa4a56be861e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java index 6545ef756e8d..766f3b3bac05 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -22,49 +22,6 @@ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Get the specified private endpoint connection associated with the container registry. * @@ -353,4 +310,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String privateEndpointConnectionName, Context context); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java index 6e9477c82e7f..9aaca627485c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -36,133 +36,6 @@ */ public interface RegistriesClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response - checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context); - - /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. - * - * @param registryNameCheckRequest The request body. - * @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 result of a request to check the availability of a container registry name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets the properties of the specified container registry. * @@ -523,114 +396,73 @@ RegistryInner update(String resourceGroupName, String registryName, void delete(String resourceGroupName, String registryName, Context context); /** - * Generate keys for a token of a specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response from the GenerateCredentials operation along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); - - /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 PollerFlux} for polling of the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, GenerateCredentialsResultInner> - beginGenerateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GenerateCredentialsResultInner> beginGenerateCredentials( - String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GenerateCredentialsResultInner> beginGenerateCredentials( - String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response from the GenerateCredentials operation on successful completion of {@link Mono}. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono generateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @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 response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Copies an image to this container registry from the specified container registry. @@ -734,6 +566,62 @@ SyncPoller, Void> beginImportImage(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) void importImage(String resourceGroupName, String registryName, ImportImageParameters parameters, Context context); + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listUsagesWithResponseAsync(String resourceGroupName, + String registryName); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listUsagesAsync(String resourceGroupName, String registryName); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context); + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName); + /** * Lists the login credentials for the specified container registry. * @@ -791,105 +679,238 @@ Response listCredentialsWithResponse(String RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName); /** - * Gets the quota usages for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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 quota usages for the specified container registry along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listUsagesWithResponseAsync(String resourceGroupName, - String registryName); + Mono> regenerateCredentialWithResponseAsync(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters); /** - * Gets the quota usages for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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 quota usages for the specified container registry on successful completion of {@link Mono}. + * @return the response from the ListCredentials operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono listUsagesAsync(String resourceGroupName, String registryName); + Mono regenerateCredentialAsync(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters); /** - * Gets the quota usages for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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 quota usages for the specified container registry along with {@link Response}. + * @return the response from the ListCredentials operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context); + Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); /** - * Gets the quota usages for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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 quota usages for the specified container registry. + * @return the response from the ListCredentials operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName); + RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters); /** - * Lists the private link resources for a container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedFlux}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); /** - * Lists the private link resources for a container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, GenerateCredentialsResultInner> + beginGenerateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); /** - * Lists the private link resources for a container registry. + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> beginGenerateCredentials( + String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GenerateCredentialsResultInner> beginGenerateCredentials( + String resourceGroupName, String registryName, GenerateCredentialsParameters generateCredentialsParameters, Context context); + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono generateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters); + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> + checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context); + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @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 result of a request to check the availability of a container registry name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest); + /** * Gets a private link resource by a specified group name for a container registry. * @@ -953,68 +974,46 @@ Response getPrivateLinkResourceWithResponse(String res PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, String registryName, String groupName); /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @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 response from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> regenerateCredentialWithResponseAsync(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, String registryName); /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @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 response from the ListCredentials operation on successful completion of {@link Mono}. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono regenerateCredentialAsync(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName); /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @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 response from the ListCredentials operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context); - - /** - * Regenerates one of the login credentials for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. - * @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 response from the ListCredentials operation. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateLinkResources(String resourceGroupName, String registryName, + Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java index 9971ae34d048..825a904af047 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,49 +23,6 @@ * An instance of this class provides access to all the operations defined in ReplicationsClient. */ public interface ReplicationsClient { - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified replication. * @@ -460,4 +417,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String replicationName, Context context); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java index 7ac88348aecb..e3282f0a84ab 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,49 +23,6 @@ * An instance of this class provides access to all the operations defined in ScopeMapsClient. */ public interface ScopeMapsClient { - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified scope map. * @@ -456,4 +413,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String scopeMapName, Context context); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java index 8381f6e7ca31..d1a9b2437a93 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -23,49 +23,6 @@ * An instance of this class provides access to all the operations defined in TokensClient. */ public interface TokensClient { - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified token. * @@ -455,4 +412,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String registryName, String tokenName, Context context); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java index ade3e606e402..491d8f8c9e51 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent; @@ -27,49 +27,6 @@ * An instance of this class provides access to all the operations defined in WebhooksClient. */ public interface WebhooksClient { - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String registryName); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, Context context); - /** * Gets the properties of the specified webhook. * @@ -462,7 +419,50 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String registryName, String webhookName, Context context); /** - * Gets the configuration of service URI and custom headers for the webhook. + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -470,15 +470,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @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 configuration of service URI and custom headers for the webhook along with {@link Response} on - * successful completion of {@link Mono}. + * @return the basic information of an event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, - String registryName, String webhookName); + Mono> pingWithResponseAsync(String resourceGroupName, String registryName, + String webhookName); /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -486,14 +485,13 @@ Mono> getCallbackConfigWithResponseAsync(String re * @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 configuration of service URI and custom headers for the webhook on successful completion of - * {@link Mono}. + * @return the basic information of an event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getCallbackConfigAsync(String resourceGroupName, String registryName, String webhookName); + Mono pingAsync(String resourceGroupName, String registryName, String webhookName); /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -502,14 +500,14 @@ Mono> getCallbackConfigWithResponseAsync(String re * @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 configuration of service URI and custom headers for the webhook along with {@link Response}. + * @return the basic information of an event along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context); + Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context); /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -517,10 +515,10 @@ Response getCallbackConfigWithResponse(String resourceGroup * @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 configuration of service URI and custom headers for the webhook. + * @return the basic information of an event. */ @ServiceMethod(returns = ReturnType.SINGLE) - CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName); + EventInfoInner ping(String resourceGroupName, String registryName, String webhookName); /** * Lists recent events for the specified webhook. @@ -567,7 +565,7 @@ PagedIterable listEvents(String resourceGroupName, String registryNa Context context); /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -575,14 +573,15 @@ PagedIterable listEvents(String resourceGroupName, String registryNa * @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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. + * @return the configuration of service URI and custom headers for the webhook along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> pingWithResponseAsync(String resourceGroupName, String registryName, - String webhookName); + Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, + String registryName, String webhookName); /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -590,13 +589,14 @@ Mono> pingWithResponseAsync(String resourceGroupName, S * @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 basic information of an event on successful completion of {@link Mono}. + * @return the configuration of service URI and custom headers for the webhook on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono pingAsync(String resourceGroupName, String registryName, String webhookName); + Mono getCallbackConfigAsync(String resourceGroupName, String registryName, String webhookName); /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -605,14 +605,14 @@ Mono> pingWithResponseAsync(String resourceGroupName, S * @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 basic information of an event along with {@link Response}. + * @return the configuration of service URI and custom headers for the webhook along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context); + Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context); /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -620,8 +620,8 @@ Response pingWithResponse(String resourceGroupName, String regis * @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 basic information of an event. + * @return the configuration of service URI and custom headers for the webhook. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventInfoInner ping(String resourceGroupName, String registryName, String webhookName); + CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java index 50003b373f6a..00e073f9b9d2 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java index 6a8f97986ec7..5249e6b2ece4 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java index 4e6b826e0c70..6c2af82eee7f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java index 712107337ddd..4a66609b808f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ /** * The configuration of service URI and custom headers for the webhook. */ -@Fluent +@Immutable public final class CallbackConfigInner implements JsonSerializable { /* * The service URI for the webhook to post notifications. @@ -31,7 +31,7 @@ public final class CallbackConfigInner implements JsonSerializable customHeaders() { return this.customHeaders; } - /** - * Set the customHeaders property: Custom headers that will be added to the webhook notifications. - * - * @param customHeaders the customHeaders value to set. - * @return the CallbackConfigInner object itself. - */ - public CallbackConfigInner withCustomHeaders(Map customHeaders) { - this.customHeaders = customHeaders; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java index 9679696618b7..fa2a7e921c8d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java index b1a36c51fae2..c4718f0d605f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java index a4cbacf9edfa..4eadb1e4788f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java index 2cef3c0e5c61..fa47fd263a4b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java index ef2636ffad14..791acc805c0a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java index 2cf08b3bdffc..1fd42a8199c5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java index 5a87ab9037cf..a93a9dec726f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The basic information of an event. */ -@Fluent +@Immutable public class EventInfoInner implements JsonSerializable { /* * The event ID. @@ -24,7 +24,7 @@ public class EventInfoInner implements JsonSerializable { /** * Creates an instance of EventInfoInner class. */ - public EventInfoInner() { + protected EventInfoInner() { } /** @@ -42,7 +42,7 @@ public String id() { * @param id the id value to set. * @return the EventInfoInner object itself. */ - public EventInfoInner withId(String id) { + EventInfoInner withId(String id) { this.id = id; return this; } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java index 4af27f581459..b7f5fb5db14d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,7 +15,7 @@ /** * The event for a webhook. */ -@Fluent +@Immutable public final class EventInner extends EventInfoInner { /* * The event request message sent to the service URI. @@ -27,10 +27,15 @@ public final class EventInner extends EventInfoInner { */ private EventResponseMessage eventResponseMessage; + /* + * The event ID. + */ + private String id; + /** * Creates an instance of EventInner class. */ - public EventInner() { + private EventInner() { } /** @@ -42,17 +47,6 @@ public EventRequestMessage eventRequestMessage() { return this.eventRequestMessage; } - /** - * Set the eventRequestMessage property: The event request message sent to the service URI. - * - * @param eventRequestMessage the eventRequestMessage value to set. - * @return the EventInner object itself. - */ - public EventInner withEventRequestMessage(EventRequestMessage eventRequestMessage) { - this.eventRequestMessage = eventRequestMessage; - return this; - } - /** * Get the eventResponseMessage property: The event response message received from the service URI. * @@ -63,23 +57,13 @@ public EventResponseMessage eventResponseMessage() { } /** - * Set the eventResponseMessage property: The event response message received from the service URI. + * Get the id property: The event ID. * - * @param eventResponseMessage the eventResponseMessage value to set. - * @return the EventInner object itself. - */ - public EventInner withEventResponseMessage(EventResponseMessage eventResponseMessage) { - this.eventResponseMessage = eventResponseMessage; - return this; - } - - /** - * {@inheritDoc} + * @return the id value. */ @Override - public EventInner withId(String id) { - super.withId(id); - return this; + public String id() { + return this.id; } /** @@ -125,7 +109,7 @@ public static EventInner fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("id".equals(fieldName)) { - deserializedEventInner.withId(reader.getString()); + deserializedEventInner.id = reader.getString(); } else if ("eventRequestMessage".equals(fieldName)) { deserializedEventInner.eventRequestMessage = EventRequestMessage.fromJson(reader); } else if ("eventResponseMessage".equals(fieldName)) { diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java index 9eb18a191afe..e8c2792ba600 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The response from the GenerateCredentials operation. */ -@Fluent +@Immutable public final class GenerateCredentialsResultInner implements JsonSerializable { /* * The username for a container registry. @@ -31,7 +31,7 @@ public final class GenerateCredentialsResultInner implements JsonSerializable passwords() { return this.passwords; } - /** - * Set the passwords property: The list of passwords for a container registry. - * - * @param passwords the passwords value to set. - * @return the GenerateCredentialsResultInner object itself. - */ - public GenerateCredentialsResultInner withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java index ba5d6ba0ad8d..3b71e3e22c84 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The definition of a container registry operation. */ -@Fluent +@Immutable public final class OperationDefinitionInner implements JsonSerializable { /* * The origin information of the container registry operation. @@ -48,7 +48,7 @@ public final class OperationDefinitionInner implements JsonSerializable { /* * The definition of Azure Monitoring service. @@ -25,7 +25,7 @@ public final class OperationPropertiesDefinition implements JsonSerializable requiredZoneNames() { return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java index 34f139a03008..54a86dd509ca 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Properties of a private link resource. */ -@Fluent +@Immutable public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredZoneNames() { return this.requiredZoneNames; } - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java index 7a9602e433b6..2d1c6a4fb2df 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.containerregistry.models.EncryptionProperty; import com.azure.resourcemanager.containerregistry.models.IdentityProperties; import com.azure.resourcemanager.containerregistry.models.NetworkRuleBypassOptions; @@ -469,30 +468,6 @@ public RegistryInner withAnonymousPullEnabled(Boolean anonymousPullEnabled) { return this; } - /** - * Get the autoGeneratedDomainNameLabelScope property: Determines the domain name label reuse scope. - * - * @return the autoGeneratedDomainNameLabelScope value. - */ - public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { - return this.innerProperties() == null ? null : this.innerProperties().autoGeneratedDomainNameLabelScope(); - } - - /** - * Set the autoGeneratedDomainNameLabelScope property: Determines the domain name label reuse scope. - * - * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner - withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withAutoGeneratedDomainNameLabelScope(autoGeneratedDomainNameLabelScope); - return this; - } - /** * Get the roleAssignmentMode property: Determines registry role assignment mode. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java index 6f2fa5fb6be4..2a006e3ca3dc 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The response from the ListCredentials operation. */ -@Fluent +@Immutable public final class RegistryListCredentialsResultInner implements JsonSerializable { /* * The username for a container registry. @@ -31,7 +31,7 @@ public final class RegistryListCredentialsResultInner implements JsonSerializabl /** * Creates an instance of RegistryListCredentialsResultInner class. */ - public RegistryListCredentialsResultInner() { + private RegistryListCredentialsResultInner() { } /** @@ -43,17 +43,6 @@ public String username() { return this.username; } - /** - * Set the username property: The username for a container registry. - * - * @param username the username value to set. - * @return the RegistryListCredentialsResultInner object itself. - */ - public RegistryListCredentialsResultInner withUsername(String username) { - this.username = username; - return this; - } - /** * Get the passwords property: The list of passwords for a container registry. * @@ -63,17 +52,6 @@ public List passwords() { return this.passwords; } - /** - * Set the passwords property: The list of passwords for a container registry. - * - * @param passwords the passwords value to set. - * @return the RegistryListCredentialsResultInner object itself. - */ - public RegistryListCredentialsResultInner withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java index 805986ccf4f6..bba22fd5ce7f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,13 +14,8 @@ /** * The result of a request to check the availability of a container registry name. */ -@Fluent +@Immutable public final class RegistryNameStatusInner implements JsonSerializable { - /* - * The complete login server name with domain name label (DNL) hash, if available - */ - private String availableLoginServerName; - /* * The value that indicates whether the name is available. */ @@ -39,29 +34,7 @@ public final class RegistryNameStatusInner implements JsonSerializable { /* * The list of container registry quota usages. @@ -26,7 +26,7 @@ public final class RegistryUsageListResultInner implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of container registry quota usages. - * - * @param value the value value to set. - * @return the RegistryUsageListResultInner object itself. - */ - public RegistryUsageListResultInner withValue(List value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java index d3f365116272..2fc7bbedc06d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java index e56dd2aeb2fa..e0f6a97841f7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java index fa1d3c01f2a9..e16c29b3c40e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java index 81f11cd84062..3032651437ab 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java index 3fe9bc576bd8..357fa3a1fe51 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java index bfd2c63c54b3..daa887a9ac44 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java index 6466e6769024..847735299d63 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java index 2cdc755170e1..a698b6c7edf0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java index e6eb11473231..e514efd38b08 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java index c42c15c6ff44..0394f8ca7f65 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java index f6aa71db4197..540936e8ced0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java index f3189dd56b9a..45c2daa11997 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java index 1dc061aab9c9..5bc8ce430b84 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.fluent.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java index cc8868eafd48..557512d4df8f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for ContainerRegistryManagementClient. + * Package containing the inner data models for ContainerRegistry. * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry * components. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java index ce3ed98eccb2..bc5b9ac41e4c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for ContainerRegistryManagementClient. + * Package containing the service clients for ContainerRegistry. * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry * components. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java index d13e96681ec0..bd4a716cf22f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.CacheRulesClient; import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.implementation.models.CacheRulesListResult; import com.azure.resourcemanager.containerregistry.models.CacheRuleUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.CacheRulesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,208 +69,62 @@ public final class CacheRulesClientImpl implements CacheRulesClient { * The interface defining all the services for ContainerRegistryManagementClientCacheRules to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientCacheRules") public interface CacheRulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, - @BodyParam("application/json") CacheRuleInner cacheRuleCreateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheRuleInner cacheRuleCreateParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, - @BodyParam("application/json") CacheRuleUpdateParameters cacheRuleUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheRuleUpdateParameters cacheRuleUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("cacheRuleName") String cacheRuleName, @HeaderParam("Accept") String accept, Context context); + @PathParam("cacheRuleName") String cacheRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all cache rule resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list cache rules for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -444,11 +298,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { cacheRuleCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, - cacheRuleCreateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, + cacheRuleCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -493,10 +348,11 @@ private Mono>> createWithResponseAsync(String resource } else { cacheRuleCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, accept, context); + resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleCreateParameters, context); } /** @@ -699,11 +555,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { cacheRuleUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, - cacheRuleUpdateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, contentType, accept, + cacheRuleUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -748,10 +605,11 @@ private Mono>> updateWithResponseAsync(String resource } else { cacheRuleUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, accept, context); + resourceGroupName, registryName, cacheRuleName, contentType, accept, cacheRuleUpdateParameters, context); } /** @@ -948,10 +806,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -988,10 +845,9 @@ private Mono>> deleteWithResponseAsync(String resource if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, accept, context); + resourceGroupName, registryName, cacheRuleName, context); } /** @@ -1137,6 +993,150 @@ public void delete(String resourceGroupName, String registryName, String cacheRu deleteAsync(resourceGroupName, registryName, cacheRuleName, context).block(); } + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list cache rules for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java index b6ad0c58b8fa..da81a9709fc6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.ConnectedRegistriesClient; import com.azure.resourcemanager.containerregistry.fluent.models.ConnectedRegistryInner; -import com.azure.resourcemanager.containerregistry.models.ConnectedRegistryListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.ConnectedRegistryListResult; import com.azure.resourcemanager.containerregistry.models.ConnectedRegistryUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,260 +70,76 @@ public final class ConnectedRegistriesClientImpl implements ConnectedRegistriesC * The interface defining all the services for ContainerRegistryManagementClientConnectedRegistries to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientConnectedRegistries") public interface ConnectedRegistriesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("connectedRegistryName") String connectedRegistryName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("connectedRegistryName") String connectedRegistryName, - @BodyParam("application/json") ConnectedRegistryInner connectedRegistryCreateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConnectedRegistryInner connectedRegistryCreateParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("connectedRegistryName") String connectedRegistryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ConnectedRegistryUpdateParameters connectedRegistryUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("connectedRegistryName") String connectedRegistryName, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deactivate(@HostParam("$host") String endpoint, + Mono>> deactivate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("connectedRegistryName") String connectedRegistryName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("connectedRegistryName") String connectedRegistryName, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String filter) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, filter, 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())); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String filter, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter)); - } - - /** - * Lists all connected registries for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters - * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. - * The supported operator is eq. - * @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 result of a request to list connected registries for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String filter, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter, context)); - } - /** * Gets the properties of the connected registry. * @@ -498,11 +314,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { connectedRegistryCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, - connectedRegistryCreateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, + accept, connectedRegistryCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -548,10 +365,12 @@ private Mono>> createWithResponseAsync(String resource } else { connectedRegistryCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, accept, context); + resourceGroupName, registryName, connectedRegistryName, contentType, accept, + connectedRegistryCreateParameters, context); } /** @@ -769,11 +588,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { connectedRegistryUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, - connectedRegistryUpdateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, contentType, + accept, connectedRegistryUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -820,10 +640,12 @@ private Mono>> updateWithResponseAsync(String resource } else { connectedRegistryUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, accept, context); + resourceGroupName, registryName, connectedRegistryName, contentType, accept, + connectedRegistryUpdateParameters, context); } /** @@ -1035,9 +857,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1075,10 +897,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context); + resourceGroupName, registryName, connectedRegistryName, context); } /** @@ -1225,6 +1046,187 @@ public void delete(String resourceGroupName, String registryName, String connect deleteAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); } + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String filter) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, filter, 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())); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String filter, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName, String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String filter, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String filter = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter)); + } + + /** + * Lists all connected registries for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param filter An OData filter expression that describes a subset of connectedRegistries to return. The parameters + * that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. + * The supported operator is eq. + * @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 result of a request to list connected registries for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String filter, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, filter, context)); + } + /** * Deactivates the connected registry instance. * @@ -1258,11 +1260,9 @@ public Mono>> deactivateWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1300,10 +1300,9 @@ private Mono>> deactivateWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java index 7730548bbe3e..cb833ff5bb5d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { ContainerRegistryManagementClientImpl.class }) public final class ContainerRegistryManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ContainerRegistryManagementClientBuilder. */ - public ContainerRegistryManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ContainerRegistryManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ContainerRegistryManagementClientBuilder. */ - public ContainerRegistryManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ContainerRegistryManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public ContainerRegistryManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ContainerRegistryManagementClientImpl client = new ContainerRegistryManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java index 1f67f083ab3b..f31e7349364e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -29,26 +29,12 @@ public final class ContainerRegistryManagementClientImpl extends AzureServiceClient implements ContainerRegistryManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -57,12 +43,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -70,6 +56,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -155,31 +155,31 @@ public CacheRulesClient getCacheRules() { } /** - * The ConnectedRegistriesClient object to access its operations. + * The CredentialSetsClient object to access its operations. */ - private final ConnectedRegistriesClient connectedRegistries; + private final CredentialSetsClient credentialSets; /** - * Gets the ConnectedRegistriesClient object to access its operations. + * Gets the CredentialSetsClient object to access its operations. * - * @return the ConnectedRegistriesClient object. + * @return the CredentialSetsClient object. */ - public ConnectedRegistriesClient getConnectedRegistries() { - return this.connectedRegistries; + public CredentialSetsClient getCredentialSets() { + return this.credentialSets; } /** - * The CredentialSetsClient object to access its operations. + * The ConnectedRegistriesClient object to access its operations. */ - private final CredentialSetsClient credentialSets; + private final ConnectedRegistriesClient connectedRegistries; /** - * Gets the CredentialSetsClient object to access its operations. + * Gets the ConnectedRegistriesClient object to access its operations. * - * @return the CredentialSetsClient object. + * @return the ConnectedRegistriesClient object. */ - public CredentialSetsClient getCredentialSets() { - return this.credentialSets; + public ConnectedRegistriesClient getConnectedRegistries() { + return this.connectedRegistries; } /** @@ -259,23 +259,23 @@ public WebhooksClient getWebhooks() { * @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 endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ ContainerRegistryManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.subscriptionId = subscriptionId; this.apiVersion = "2025-11-01"; this.operations = new OperationsClientImpl(this); this.registries = new RegistriesClientImpl(this); this.cacheRules = new CacheRulesClientImpl(this); - this.connectedRegistries = new ConnectedRegistriesClientImpl(this); this.credentialSets = new CredentialSetsClientImpl(this); + this.connectedRegistries = new ConnectedRegistriesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.replications = new ReplicationsClientImpl(this); this.scopeMaps = new ScopeMapsClientImpl(this); diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java index 46b1d23d3622..bb3588ef357c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.CredentialSetsClient; import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetInner; -import com.azure.resourcemanager.containerregistry.models.CredentialSetListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.CredentialSetListResult; import com.azure.resourcemanager.containerregistry.models.CredentialSetUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,210 +69,64 @@ public final class CredentialSetsClientImpl implements CredentialSetsClient { * The interface defining all the services for ContainerRegistryManagementClientCredentialSets to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientCredentialSets") public interface CredentialSetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, - @BodyParam("application/json") CredentialSetInner credentialSetCreateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CredentialSetInner credentialSetCreateParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, + @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CredentialSetUpdateParameters credentialSetUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("credentialSetName") String credentialSetName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("credentialSetName") String credentialSetName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all credential set resources for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list credential sets for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -449,11 +303,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { credentialSetCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, - credentialSetCreateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, + accept, credentialSetCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -499,10 +354,12 @@ private Mono>> createWithResponseAsync(String resource } else { credentialSetCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, accept, context); + resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetCreateParameters, + context); } /** @@ -717,11 +574,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { credentialSetUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, - credentialSetUpdateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, contentType, + accept, credentialSetUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -767,10 +625,12 @@ private Mono>> updateWithResponseAsync(String resource } else { credentialSetUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, accept, context); + resourceGroupName, registryName, credentialSetName, contentType, accept, credentialSetUpdateParameters, + context); } /** @@ -977,10 +837,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1018,10 +877,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, accept, context); + resourceGroupName, registryName, credentialSetName, context); } /** @@ -1168,6 +1026,150 @@ public void delete(String resourceGroupName, String registryName, String credent deleteAsync(resourceGroupName, registryName, credentialSetName, context).block(); } + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java index 70f7a93d4bf6..3c4fce62c578 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerregistry.fluent.OperationsClient; import com.azure.resourcemanager.containerregistry.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.containerregistry.models.OperationListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ContainerRegistryManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ContainerRegistry/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java index e8fbcb1e9ee0..c8b47f8479c6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerregistry.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerregistry.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.PrivateEndpointConnectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,47 +67,45 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for ContainerRegistryManagementClientPrivateEndpointConnections to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -115,157 +113,10 @@ Mono>> delete(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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 private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * List all private endpoint connections in a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list private endpoint connections for a container registry as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); - } - /** * Get the specified private endpoint connection associated with the container registry. * @@ -446,11 +297,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { privateEndpointConnection.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection, accept, context)) + contentType, accept, privateEndpointConnection, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -497,11 +349,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { privateEndpointConnection.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, - privateEndpointConnection, accept, context); + contentType, accept, privateEndpointConnection, context); } /** @@ -716,11 +569,8 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -758,10 +608,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, accept, context); + resourceGroupName, registryName, privateEndpointConnectionName, context); } /** @@ -910,6 +759,153 @@ public void delete(String resourceGroupName, String registryName, String private deleteAsync(resourceGroupName, registryName, privateEndpointConnectionName, context).block(); } + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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 private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * List all private endpoint connections in a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private endpoint connections for a container registry as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java index f536a0b9868a..fd426283036d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -40,11 +40,11 @@ import com.azure.resourcemanager.containerregistry.fluent.models.RegistryListCredentialsResultInner; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryNameStatusInner; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.implementation.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.RegistryListResult; import com.azure.resourcemanager.containerregistry.models.GenerateCredentialsParameters; import com.azure.resourcemanager.containerregistry.models.ImportImageParameters; -import com.azure.resourcemanager.containerregistry.models.PrivateLinkResourceListResult; import com.azure.resourcemanager.containerregistry.models.RegenerateCredentialParameters; -import com.azure.resourcemanager.containerregistry.models.RegistryListResult; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; import com.azure.resourcemanager.containerregistry.models.RegistryUpdateParameters; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -84,177 +84,174 @@ public final class RegistriesClientImpl implements InnerSupportsGet> checkNameAvailability(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") RegistryNameCheckRequest registryNameCheckRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @BodyParam("application/json") RegistryInner registry, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner registry, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @BodyParam("application/json") RegistryUpdateParameters registryUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryUpdateParameters registryUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> generateCredentials(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @BodyParam("application/json") GenerateCredentialsParameters generateCredentialsParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importImage(@HostParam("$host") String endpoint, + Mono>> importImage(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @BodyParam("application/json") ImportImageParameters parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ImportImageParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredentials(@HostParam("$host") String endpoint, + Mono> listUsages(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listUsages(@HostParam("$host") String endpoint, + Mono> listCredentials(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPrivateLinkResources(@HostParam("$host") String endpoint, + Mono> regenerateCredential(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegenerateCredentialParameters regenerateCredentialParameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> generateCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GenerateCredentialsParameters generateCredentialsParameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryNameCheckRequest registryNameCheckRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPrivateLinkResource(@HostParam("$host") String endpoint, + Mono> getPrivateLinkResource(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateCredential(@HostParam("$host") String endpoint, + Mono> listPrivateLinkResources(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @BodyParam("application/json") RegenerateCredentialParameters regenerateCredentialParameters, @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); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listPrivateLinkResourcesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. + * Gets the properties of the specified container registry. * - * @param registryNameCheckRequest The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to check the availability of a container registry name along with - * {@link Response} on successful completion of {@link Mono}. + * @return the properties of the specified container registry along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String registryName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -263,35 +260,35 @@ Mono> listPrivateLinkResourcesNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (registryNameCheckRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter registryNameCheckRequest is required and cannot be null.")); - } else { - registryNameCheckRequest.validate(); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), registryNameCheckRequest, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. + * Gets the properties of the specified container registry. * - * @param registryNameCheckRequest The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. * @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 result of a request to check the availability of a container registry name along with - * {@link Response} on successful completion of {@link Mono}. + * @return the properties of the specified container registry along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String registryName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -300,78 +297,82 @@ Mono> listPrivateLinkResourcesNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (registryNameCheckRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter registryNameCheckRequest is required and cannot be null.")); - } else { - registryNameCheckRequest.validate(); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), registryNameCheckRequest, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); } /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. + * Gets the properties of the specified container registry. * - * @param registryNameCheckRequest The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to check the availability of a container registry name on successful completion - * of {@link Mono}. + * @return the properties of the specified container registry on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest) { - return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest) + public Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. + * Gets the properties of the specified container registry. * - * @param registryNameCheckRequest The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. * @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 result of a request to check the availability of a container registry name along with - * {@link Response}. + * @return the properties of the specified container registry along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response - checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { - return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest, context).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); } /** - * Checks whether the container registry name is available for use. The name must contain only alphanumeric - * characters, be globally unique, and between 5 and 50 characters in length. + * Gets the properties of the specified container registry. * - * @param registryNameCheckRequest The request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to check the availability of a container registry name. + * @return the properties of the specified container registry. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { - return checkNameAvailabilityWithResponse(registryNameCheckRequest, Context.NONE).getValue(); + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); } /** - * Lists all the container registries under the specified subscription. + * Creates a container registry with the specified parameters. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + RegistryInner registry) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -380,27 +381,41 @@ private Mono> listSinglePageAsync() { 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (registry == null) { + return Mono.error(new IllegalArgumentException("Parameter registry is required and cannot be null.")); + } else { + registry.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, registry, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the container registries under the specified subscription. + * Creates a container registry with the specified parameters. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. * @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 result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return an object that represents a container registry along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + RegistryInner registry, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -409,425 +424,50 @@ private Mono> listSinglePageAsync(Context context) 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (registry == null) { + return Mono.error(new IllegalArgumentException("Parameter registry is required and cannot be null.")); + } else { + registry.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, contentType, accept, registry, context); } /** - * Lists all the container registries under the specified subscription. + * Creates a container registry with the specified parameters. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to list container registries as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an object that represents a container registry. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, + String registryName, RegistryInner registry) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, registry); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, this.client.getContext()); } /** - * Lists all the container registries under the specified subscription. + * Creates a container registry with the specified parameters. * - * @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 result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @throws 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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all the container registries under the specified subscription. - * - * @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 result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, 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())); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists all the container registries under the specified resource group. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 properties of the specified container registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Gets the properties of the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 properties of the specified container registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - RegistryInner registry) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (registry == null) { - return Mono.error(new IllegalArgumentException("Parameter registry is required and cannot be null.")); - } else { - registry.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, registry, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @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 an object that represents a container registry along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String registryName, - RegistryInner registry, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (registry == null) { - return Mono.error(new IllegalArgumentException("Parameter registry is required and cannot be null.")); - } else { - registry.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, registry, accept, context); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an object that represents a container registry. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RegistryInner> beginCreateAsync(String resourceGroupName, - String registryName, RegistryInner registry) { - Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, registry); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); - } - - /** - * Creates a container registry with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param registry The parameters for creating a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param registry The parameters for creating a container registry. * @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. @@ -985,11 +625,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { registryUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, registryUpdateParameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + registryUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1030,10 +671,11 @@ private Mono>> updateWithResponseAsync(String resource } else { registryUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, registryUpdateParameters, accept, context); + resourceGroupName, registryName, contentType, accept, registryUpdateParameters, context); } /** @@ -1213,10 +855,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1249,10 +890,9 @@ private Mono>> deleteWithResponseAsync(String resource if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context); + resourceGroupName, registryName, context); } /** @@ -1386,20 +1026,17 @@ public void delete(String resourceGroupName, String registryName, Context contex } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the GenerateCredentials operation along with {@link Response} on successful completion - * of {@link Mono}. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, - String registryName, GenerateCredentialsParameters generateCredentialsParameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1412,39 +1049,29 @@ public Mono>> generateCredentialsWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (generateCredentialsParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter generateCredentialsParameters is required and cannot be null.")); - } else { - generateCredentialsParameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, generateCredentialsParameters, accept, - context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 from the GenerateCredentials operation along with {@link Response} on successful completion - * of {@link Mono}. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, - String registryName, GenerateCredentialsParameters generateCredentialsParameters, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1457,180 +1084,182 @@ private Mono>> generateCredentialsWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (generateCredentialsParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter generateCredentialsParameters is required and cannot be null.")); - } else { - generateCredentialsParameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, generateCredentialsParameters, accept, - context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, GenerateCredentialsResultInner> - beginGenerateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - Mono>> mono - = generateCredentialsWithResponseAsync(resourceGroupName, registryName, generateCredentialsParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GenerateCredentialsResultInner> - beginGenerateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = generateCredentialsWithResponseAsync(resourceGroupName, registryName, - generateCredentialsParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GenerateCredentialsResultInner> - beginGenerateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return this.beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 the response from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GenerateCredentialsResultInner> - beginGenerateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return this - .beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the GenerateCredentials operation on successful completion of {@link Mono}. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono generateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync() { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 from the GenerateCredentials operation on successful completion of {@link Mono}. + * @return the result of a request to list container registries along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCredentialsAsync(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. + * @throws 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 result of a request to list container registries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @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 from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters) { - return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the container registries under the specified subscription. + * + * @throws 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 result of a request to list container registries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Generate keys for a token of a specified container registry. + * Lists all the container registries under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param generateCredentialsParameters The parameters for generating credentials. * @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 from the GenerateCredentials operation. + * @return the result of a request to list container registries as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, - GenerateCredentialsParameters generateCredentialsParameters, Context context) { - return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -1667,10 +1296,10 @@ public Mono>> importImageWithResponseAsync(String reso } else { parameters.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1709,10 +1338,10 @@ private Mono>> importImageWithResponseAsync(String res } else { parameters.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); return service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, parameters, context); } /** @@ -1862,10 +1491,253 @@ public void importImage(String resourceGroupName, String registryName, ImportIma } /** - * Lists the login credentials for the specified container registry. + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listUsagesWithResponseAsync(String resourceGroupName, + String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesWithResponseAsync(String resourceGroupName, + String registryName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listUsagesAsync(String resourceGroupName, String registryName) { + return listUsagesWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 quota usages for the specified container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listUsagesWithResponse(String resourceGroupName, String registryName, + Context context) { + return listUsagesWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Gets the quota usages for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quota usages for the specified container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { + return listUsagesWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCredentialsWithResponseAsync(String resourceGroupName, + String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 from the ListCredentials operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listCredentialsWithResponseAsync(String resourceGroupName, String registryName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listCredentialsAsync(String resourceGroupName, + String registryName) { + return listCredentialsWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 from the ListCredentials operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCredentialsWithResponse(String resourceGroupName, + String registryName, Context context) { + return listCredentialsWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Lists the login credentials for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 from the ListCredentials operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName) { + return listCredentialsWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1873,8 +1745,8 @@ public void importImage(String resourceGroupName, String registryName, ImportIma * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listCredentialsWithResponseAsync(String resourceGroupName, - String registryName) { + public Mono> regenerateCredentialWithResponseAsync( + String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1890,18 +1762,28 @@ public Mono> listCredentialsWithRes if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } + if (regenerateCredentialParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter regenerateCredentialParameters is required and cannot be null.")); + } else { + regenerateCredentialParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + regenerateCredentialParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the login credentials for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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. @@ -1910,8 +1792,9 @@ public Mono> listCredentialsWithRes * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listCredentialsWithResponseAsync(String resourceGroupName, String registryName, Context context) { + private Mono> regenerateCredentialWithResponseAsync( + String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1927,34 +1810,46 @@ public Mono> listCredentialsWithRes if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } + if (regenerateCredentialParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter regenerateCredentialParameters is required and cannot be null.")); + } else { + regenerateCredentialParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + return service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + regenerateCredentialParameters, context); } /** - * Lists the login credentials for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listCredentialsAsync(String resourceGroupName, - String registryName) { - return listCredentialsWithResponseAsync(resourceGroupName, registryName) + public Mono regenerateCredentialAsync(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { + return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the login credentials for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @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. @@ -1962,40 +1857,45 @@ public Mono listCredentialsAsync(String reso * @return the response from the ListCredentials operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCredentialsWithResponse(String resourceGroupName, - String registryName, Context context) { - return listCredentialsWithResponseAsync(resourceGroupName, registryName, context).block(); + public Response regenerateCredentialWithResponse(String resourceGroupName, + String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { + return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters, + context).block(); } /** - * Lists the login credentials for the specified container registry. + * Regenerates one of the login credentials for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or + * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the ListCredentials operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryListCredentialsResultInner listCredentials(String resourceGroupName, String registryName) { - return listCredentialsWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + public RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, + RegenerateCredentialParameters regenerateCredentialParameters) { + return regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, + Context.NONE).getValue(); } /** - * Gets the quota usages for the specified container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 quota usages for the specified container registry along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listUsagesWithResponseAsync(String resourceGroupName, - String registryName) { + public Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, + String registryName, GenerateCredentialsParameters generateCredentialsParameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2011,28 +1911,36 @@ public Mono> listUsagesWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } + if (generateCredentialsParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter generateCredentialsParameters is required and cannot be null.")); + } else { + generateCredentialsParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + generateCredentialsParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the quota usages for the specified container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @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 quota usages for the specified container registry along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUsagesWithResponseAsync(String resourceGroupName, - String registryName, Context context) { + private Mono>> generateCredentialsWithResponseAsync(String resourceGroupName, + String registryName, GenerateCredentialsParameters generateCredentialsParameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2048,114 +1956,232 @@ private Mono> listUsagesWithResponseAsync if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } + if (generateCredentialsParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter generateCredentialsParameters is required and cannot be null.")); + } else { + generateCredentialsParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); + return service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, + generateCredentialsParameters, context); } /** - * Gets the quota usages for the specified container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 quota usages for the specified container registry on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, GenerateCredentialsResultInner> + beginGenerateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + Mono>> mono + = generateCredentialsWithResponseAsync(resourceGroupName, registryName, generateCredentialsParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, + this.client.getContext()); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> + beginGenerateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = generateCredentialsWithResponseAsync(resourceGroupName, registryName, + generateCredentialsParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GenerateCredentialsResultInner.class, GenerateCredentialsResultInner.class, + context); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, GenerateCredentialsResultInner> + beginGenerateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return this.beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters) + .getSyncPoller(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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, GenerateCredentialsResultInner> + beginGenerateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return this + .beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .getSyncPoller(); + } + + /** + * Generate keys for a token of a specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listUsagesAsync(String resourceGroupName, String registryName) { - return listUsagesWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono generateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the quota usages for the specified container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @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 quota usages for the specified container registry along with {@link Response}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listUsagesWithResponse(String resourceGroupName, String registryName, - Context context) { - return listUsagesWithResponseAsync(resourceGroupName, registryName, context).block(); + private Mono generateCredentialsAsync(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return beginGenerateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the quota usages for the specified container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 quota usages for the specified container registry. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { - return listUsagesWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters) { + return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters).block(); } /** - * Lists the private link resources for a container registry. + * Generate keys for a token of a specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. + * @param generateCredentialsParameters The parameters for generating credentials. + * @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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName) { + public GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName, + GenerateCredentialsParameters generateCredentialsParameters, Context context) { + return generateCredentialsAsync(resourceGroupName, registryName, generateCredentialsParameters, context) + .block(); + } + + /** + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. + * + * @param registryNameCheckRequest The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to check the availability of a container registry name along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest) { 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.")); + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + if (registryNameCheckRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter registryNameCheckRequest is required and cannot be null.")); + } else { + registryNameCheckRequest.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the private link resources for a container registry. + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. + * @param registryNameCheckRequest The request body. * @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 result of a request to list private link resources for a container registry along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the result of a request to check the availability of a container registry name along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName, Context context) { + private Mono> + checkNameAvailabilityWithResponseAsync(RegistryNameCheckRequest registryNameCheckRequest, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2164,92 +2190,67 @@ public RegistryUsageListResultInner listUsages(String resourceGroupName, String 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + if (registryNameCheckRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter registryNameCheckRequest is required and cannot be null.")); + } else { + registryNameCheckRequest.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, registryNameCheckRequest, context); } /** - * Lists the private link resources for a container registry. + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. + * @param registryNameCheckRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedFlux}. + * @return the result of a request to check the availability of a container registry name on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, - String registryName) { - return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName), - nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(RegistryNameCheckRequest registryNameCheckRequest) { + return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the private link resources for a container registry. + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. + * @param registryNameCheckRequest The request body. * @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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, - String registryName, Context context) { - return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the private link resources for a container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. + * @return the result of a request to check the availability of a container registry name along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateLinkResources(String resourceGroupName, - String registryName) { - return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + checkNameAvailabilityWithResponse(RegistryNameCheckRequest registryNameCheckRequest, Context context) { + return checkNameAvailabilityWithResponseAsync(registryNameCheckRequest, context).block(); } /** - * Lists the private link resources for a container registry. + * Checks whether the container registry name is available for use. The name must contain only alphanumeric + * characters, be globally unique, and between 5 and 50 characters in length. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @param context The context to associate with this operation. + * @param registryNameCheckRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of a request to list private link resources for a container registry as paginated response - * with {@link PagedIterable}. + * @return the result of a request to check the availability of a container registry name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateLinkResources(String resourceGroupName, - String registryName, Context context) { - return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryNameStatusInner checkNameAvailability(RegistryNameCheckRequest registryNameCheckRequest) { + return checkNameAvailabilityWithResponse(registryNameCheckRequest, Context.NONE).getValue(); } /** @@ -2388,21 +2389,19 @@ public PrivateLinkResourceInner getPrivateLinkResource(String resourceGroupName, } /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> regenerateCredentialWithResponseAsync( - String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { + private Mono> + listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2418,38 +2417,31 @@ public Mono> regenerateCredentialWi if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - if (regenerateCredentialParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter regenerateCredentialParameters is required and cannot be null.")); - } else { - regenerateCredentialParameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, regenerateCredentialParameters, - accept, context)) + .withContext( + context -> service.listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); } /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @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 from the ListCredentials operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the result of a request to list private link resources for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regenerateCredentialWithResponseAsync( - String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters, - Context context) { + private Mono> + listPrivateLinkResourcesSinglePageAsync(String resourceGroupName, String registryName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2465,75 +2457,85 @@ private Mono> regenerateCredentialW if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - if (regenerateCredentialParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter regenerateCredentialParameters is required and cannot be null.")); - } else { - regenerateCredentialParameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, regenerateCredentialParameters, accept, - context); + return service + .listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the ListCredentials operation on successful completion of {@link Mono}. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono regenerateCredentialAsync(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters) { - return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, + String registryName) { + return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName), + nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink)); } /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @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 from the ListCredentials operation along with {@link Response}. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response regenerateCredentialWithResponse(String resourceGroupName, - String registryName, RegenerateCredentialParameters regenerateCredentialParameters, Context context) { - return regenerateCredentialWithResponseAsync(resourceGroupName, registryName, regenerateCredentialParameters, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPrivateLinkResourcesAsync(String resourceGroupName, + String registryName, Context context) { + return new PagedFlux<>(() -> listPrivateLinkResourcesSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listPrivateLinkResourcesNextSinglePageAsync(nextLink, context)); } /** - * Regenerates one of the login credentials for the specified container registry. + * Lists the private link resources for a container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- password or - * password2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 from the ListCredentials operation. + * @return the result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, - RegenerateCredentialParameters regenerateCredentialParameters) { - return regenerateCredentialWithResponse(resourceGroupName, registryName, regenerateCredentialParameters, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateLinkResources(String resourceGroupName, + String registryName) { + return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName)); + } + + /** + * Lists the private link resources for a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list private link resources for a container registry as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateLinkResources(String resourceGroupName, + String registryName, Context context) { + return new PagedIterable<>(listPrivateLinkResourcesAsync(resourceGroupName, registryName, context)); } /** @@ -2547,7 +2549,7 @@ public RegistryListCredentialsResultInner regenerateCredential(String resourceGr * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2556,7 +2558,9 @@ private Mono> listNextSinglePageAsync(String nextLi 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)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(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())); @@ -2574,7 +2578,8 @@ private Mono> listNextSinglePageAsync(String nextLi * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2584,7 +2589,7 @@ private Mono> listNextSinglePageAsync(String nextLi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2600,7 +2605,7 @@ private Mono> listNextSinglePageAsync(String nextLi * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2609,9 +2614,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -2629,8 +2632,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2640,7 +2642,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java index 1eb0e3ca8416..9b9fe37d6f17 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.ReplicationsClient; import com.azure.resourcemanager.containerregistry.fluent.models.ReplicationInner; -import com.azure.resourcemanager.containerregistry.models.ReplicationListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.ReplicationListResult; import com.azure.resourcemanager.containerregistry.models.ReplicationUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,210 +69,63 @@ public final class ReplicationsClientImpl implements ReplicationsClient { * The interface defining all the services for ContainerRegistryManagementClientReplications to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientReplications") public interface ReplicationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("replicationName") String replicationName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, - @BodyParam("application/json") ReplicationInner replication, @HeaderParam("Accept") String accept, + @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ReplicationInner replication, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, - @BodyParam("application/json") ReplicationUpdateParameters replicationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("replicationName") String replicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ReplicationUpdateParameters replicationUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("replicationName") String replicationName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("replicationName") String replicationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the replications for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list replications for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -448,11 +301,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { replication.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, replication, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, + replication, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -497,10 +351,11 @@ private Mono>> createWithResponseAsync(String resource } else { replication.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, replication, accept, context); + resourceGroupName, registryName, replicationName, contentType, accept, replication, context); } /** @@ -704,11 +559,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { replicationUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, - replicationUpdateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, contentType, accept, + replicationUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -754,10 +610,12 @@ private Mono>> updateWithResponseAsync(String resource } else { replicationUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, replicationUpdateParameters, accept, context); + resourceGroupName, registryName, replicationName, contentType, accept, replicationUpdateParameters, + context); } /** @@ -959,10 +817,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1000,10 +857,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, accept, context); + resourceGroupName, registryName, replicationName, context); } /** @@ -1150,6 +1006,150 @@ public void delete(String resourceGroupName, String registryName, String replica deleteAsync(resourceGroupName, registryName, replicationName, context).block(); } + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the replications for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list replications for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java index 1228c61f93db..caec7a54c82b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.ScopeMapsClient; import com.azure.resourcemanager.containerregistry.fluent.models.ScopeMapInner; -import com.azure.resourcemanager.containerregistry.models.ScopeMapListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.ScopeMapListResult; import com.azure.resourcemanager.containerregistry.models.ScopeMapUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,208 +69,62 @@ public final class ScopeMapsClientImpl implements ScopeMapsClient { * The interface defining all the services for ContainerRegistryManagementClientScopeMaps to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientScopeMaps") public interface ScopeMapsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, - @BodyParam("application/json") ScopeMapInner scopeMapCreateParameters, @HeaderParam("Accept") String accept, + @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScopeMapInner scopeMapCreateParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, - @BodyParam("application/json") ScopeMapUpdateParameters scopeMapUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScopeMapUpdateParameters scopeMapUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("scopeMapName") String scopeMapName, @HeaderParam("Accept") String accept, Context context); + @PathParam("scopeMapName") String scopeMapName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the scope maps for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list scope maps for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -444,11 +298,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { scopeMapCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, - scopeMapCreateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, + scopeMapCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -493,10 +348,11 @@ private Mono>> createWithResponseAsync(String resource } else { scopeMapCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, accept, context); + resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapCreateParameters, context); } /** @@ -698,11 +554,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { scopeMapUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, - scopeMapUpdateParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, contentType, accept, + scopeMapUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -747,10 +604,11 @@ private Mono>> updateWithResponseAsync(String resource } else { scopeMapUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, accept, context); + resourceGroupName, registryName, scopeMapName, contentType, accept, scopeMapUpdateParameters, context); } /** @@ -944,10 +802,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -984,10 +841,9 @@ private Mono>> deleteWithResponseAsync(String resource if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, accept, context); + resourceGroupName, registryName, scopeMapName, context); } /** @@ -1133,6 +989,150 @@ public void delete(String resourceGroupName, String registryName, String scopeMa deleteAsync(resourceGroupName, registryName, scopeMapName, context).block(); } + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the scope maps for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list scope maps for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java index d79c1f67e496..8b38eda985fd 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerregistry.fluent.TokensClient; import com.azure.resourcemanager.containerregistry.fluent.models.TokenInner; -import com.azure.resourcemanager.containerregistry.models.TokenListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.TokenListResult; import com.azure.resourcemanager.containerregistry.models.TokenUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,207 +68,62 @@ public final class TokensClientImpl implements TokensClient { * The interface defining all the services for ContainerRegistryManagementClientTokens to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientTokens") public interface TokensService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("tokenName") String tokenName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, @BodyParam("application/json") TokenInner tokenCreateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") TokenInner tokenCreateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, - @BodyParam("application/json") TokenUpdateParameters tokenUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("tokenName") String tokenName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TokenUpdateParameters tokenUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("tokenName") String tokenName, @HeaderParam("Accept") String accept, Context context); + @PathParam("tokenName") String tokenName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @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); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the tokens for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list tokens for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -442,11 +297,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { tokenCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, tokenCreateParameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, + tokenCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -491,10 +347,11 @@ private Mono>> createWithResponseAsync(String resource } else { tokenCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, tokenCreateParameters, accept, context); + resourceGroupName, registryName, tokenName, contentType, accept, tokenCreateParameters, context); } /** @@ -695,11 +552,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { tokenUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, tokenUpdateParameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, contentType, accept, + tokenUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -744,10 +602,11 @@ private Mono>> updateWithResponseAsync(String resource } else { tokenUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, tokenUpdateParameters, accept, context); + resourceGroupName, registryName, tokenName, contentType, accept, tokenUpdateParameters, context); } /** @@ -940,10 +799,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -980,10 +838,9 @@ private Mono>> deleteWithResponseAsync(String resource if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, accept, context); + resourceGroupName, registryName, tokenName, context); } /** @@ -1128,6 +985,150 @@ public void delete(String resourceGroupName, String registryName, String tokenNa deleteAsync(resourceGroupName, registryName, tokenName, context).block(); } + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the tokens for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list tokens for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java index 1c9f03ed1b48..74ebcebf7e54 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.implementation; @@ -38,9 +38,9 @@ import com.azure.resourcemanager.containerregistry.fluent.models.EventInfoInner; import com.azure.resourcemanager.containerregistry.fluent.models.EventInner; import com.azure.resourcemanager.containerregistry.fluent.models.WebhookInner; -import com.azure.resourcemanager.containerregistry.models.EventListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.EventListResult; +import com.azure.resourcemanager.containerregistry.implementation.models.WebhookListResult; import com.azure.resourcemanager.containerregistry.models.WebhookCreateParameters; -import com.azure.resourcemanager.containerregistry.models.WebhookListResult; import com.azure.resourcemanager.containerregistry.models.WebhookUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -74,63 +74,61 @@ public final class WebhooksClientImpl implements WebhooksClient { * The interface defining all the services for ContainerRegistryManagementClientWebhooks to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerRegistryManagementClientWebhooks") public interface WebhooksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, - @BodyParam("application/json") WebhookCreateParameters webhookCreateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebhookCreateParameters webhookCreateParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, - @BodyParam("application/json") WebhookUpdateParameters webhookUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("webhookName") String webhookName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebhookUpdateParameters webhookUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); + @PathParam("webhookName") String webhookName, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getCallbackConfig(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> ping(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); @@ -139,16 +137,16 @@ Mono> getCallbackConfig(@HostParam("$host") String @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEvents(@HostParam("$host") String endpoint, + Mono> listEvents(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> ping(@HostParam("$host") String endpoint, + Mono> getCallbackConfig(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("webhookName") String webhookName, @HeaderParam("Accept") String accept, Context context); @@ -158,158 +156,14 @@ Mono> ping(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listEventsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String registryName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName)); - } - - /** - * Lists all the webhooks for the specified container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName The name of the container registry. - * @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 result of a request to list webhooks for a container registry as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -483,11 +337,12 @@ public Mono>> createWithResponseAsync(String resourceG } else { webhookCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, webhookCreateParameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, + webhookCreateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -532,10 +387,11 @@ private Mono>> createWithResponseAsync(String resource } else { webhookCreateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, webhookCreateParameters, accept, context); + resourceGroupName, registryName, webhookName, contentType, accept, webhookCreateParameters, context); } /** @@ -737,11 +593,12 @@ public Mono>> updateWithResponseAsync(String resourceG } else { webhookUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, webhookUpdateParameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, contentType, accept, + webhookUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -786,10 +643,11 @@ private Mono>> updateWithResponseAsync(String resource } else { webhookUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, webhookUpdateParameters, accept, context); + resourceGroupName, registryName, webhookName, contentType, accept, webhookUpdateParameters, context); } /** @@ -983,10 +841,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1023,10 +880,9 @@ private Mono>> deleteWithResponseAsync(String resource if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context); + resourceGroupName, registryName, webhookName, context); } /** @@ -1172,20 +1028,163 @@ public void delete(String resourceGroupName, String registryName, String webhook } /** - * Gets the configuration of service URI and custom headers for the webhook. + * Lists all the webhooks for the specified container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. - * @param webhookName The name of the webhook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 configuration of service URI and custom headers for the webhook along with {@link Response} on + * @return the result of a request to list webhooks for a container registry along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, - String registryName, String webhookName) { + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, 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())); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all the webhooks for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @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 result of a request to list webhooks for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Triggers a ping event to be sent to the webhook. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param webhookName The name of the webhook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> pingWithResponseAsync(String resourceGroupName, String registryName, + String webhookName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1206,13 +1205,13 @@ public Mono> getCallbackConfigWithResponseAsync(St } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1221,12 +1220,11 @@ public Mono> getCallbackConfigWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration of service URI and custom headers for the webhook along with {@link Response} on - * successful completion of {@link Mono}. + * @return the basic information of an event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, - String registryName, String webhookName, Context context) { + private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, + String webhookName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1247,12 +1245,12 @@ private Mono> getCallbackConfigWithResponseAsync(S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context); + return service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); } /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1260,18 +1258,16 @@ private Mono> getCallbackConfigWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration of service URI and custom headers for the webhook on successful completion of - * {@link Mono}. + * @return the basic information of an event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCallbackConfigAsync(String resourceGroupName, String registryName, - String webhookName) { - return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName) + public Mono pingAsync(String resourceGroupName, String registryName, String webhookName) { + return pingWithResponseAsync(resourceGroupName, registryName, webhookName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1280,16 +1276,16 @@ public Mono getCallbackConfigAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration of service URI and custom headers for the webhook along with {@link Response}. + * @return the basic information of an event along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, - String webhookName, Context context) { - return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); + public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, + Context context) { + return pingWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); } /** - * Gets the configuration of service URI and custom headers for the webhook. + * Triggers a ping event to be sent to the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1297,11 +1293,11 @@ public Response getCallbackConfigWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 configuration of service URI and custom headers for the webhook. + * @return the basic information of an event. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { - return getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + public EventInfoInner ping(String resourceGroupName, String registryName, String webhookName) { + return pingWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); } /** @@ -1460,7 +1456,7 @@ public PagedIterable listEvents(String resourceGroupName, String reg } /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1468,11 +1464,12 @@ public PagedIterable listEvents(String resourceGroupName, String reg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 basic information of an event along with {@link Response} on successful completion of {@link Mono}. + * @return the configuration of service URI and custom headers for the webhook along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> pingWithResponseAsync(String resourceGroupName, String registryName, - String webhookName) { + public Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, + String registryName, String webhookName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1493,13 +1490,13 @@ public Mono> pingWithResponseAsync(String resourceGroup } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.ping(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1508,11 +1505,12 @@ public Mono> pingWithResponseAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the basic information of an event along with {@link Response} on successful completion of {@link Mono}. + * @return the configuration of service URI and custom headers for the webhook along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> pingWithResponseAsync(String resourceGroupName, String registryName, - String webhookName, Context context) { + private Mono> getCallbackConfigWithResponseAsync(String resourceGroupName, + String registryName, String webhookName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1533,12 +1531,12 @@ private Mono> pingWithResponseAsync(String resourceGrou } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context); + return service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context); } /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1546,16 +1544,18 @@ private Mono> pingWithResponseAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 basic information of an event on successful completion of {@link Mono}. + * @return the configuration of service URI and custom headers for the webhook on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono pingAsync(String resourceGroupName, String registryName, String webhookName) { - return pingWithResponseAsync(resourceGroupName, registryName, webhookName) + public Mono getCallbackConfigAsync(String resourceGroupName, String registryName, + String webhookName) { + return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1564,16 +1564,16 @@ public Mono pingAsync(String resourceGroupName, String registryN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 basic information of an event along with {@link Response}. + * @return the configuration of service URI and custom headers for the webhook along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response pingWithResponse(String resourceGroupName, String registryName, String webhookName, - Context context) { - return pingWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); + public Response getCallbackConfigWithResponse(String resourceGroupName, String registryName, + String webhookName, Context context) { + return getCallbackConfigWithResponseAsync(resourceGroupName, registryName, webhookName, context).block(); } /** - * Triggers a ping event to be sent to the webhook. + * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. @@ -1581,11 +1581,11 @@ public Response pingWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the basic information of an event. + * @return the configuration of service URI and custom headers for the webhook. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventInfoInner ping(String resourceGroupName, String registryName, String webhookName) { - return pingWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); + public CallbackConfigInner getCallbackConfig(String resourceGroupName, String registryName, String webhookName) { + return getCallbackConfigWithResponse(resourceGroupName, registryName, webhookName, Context.NONE).getValue(); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java index e0b8a284889f..17eea5f8ff00 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list cache rules for a container registry. */ -@Fluent +@Immutable public final class CacheRulesListResult implements JsonSerializable { /* * The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next @@ -32,7 +32,7 @@ public final class CacheRulesListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of cache rules. Since this list may be incomplete, the nextLink field should be - * used to request the next list of cache rules. - * - * @param value the value value to set. - * @return the CacheRulesListResult object itself. - */ - public CacheRulesListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of cache rules. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of cache rules. - * - * @param nextLink the nextLink value to set. - * @return the CacheRulesListResult object itself. - */ - public CacheRulesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java index ba11dff7dc4a..d960841d48e2 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list connected registries for a container registry. */ -@Fluent +@Immutable public final class ConnectedRegistryListResult implements JsonSerializable { /* * The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request @@ -32,7 +32,7 @@ public final class ConnectedRegistryListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of connected registries. Since this list may be incomplete, the nextLink field - * should be used to request the next list of connected registries. - * - * @param value the value value to set. - * @return the ConnectedRegistryListResult object itself. - */ - public ConnectedRegistryListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of connected registries. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of connected registries. - * - * @param nextLink the nextLink value to set. - * @return the ConnectedRegistryListResult object itself. - */ - public ConnectedRegistryListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java index 41bccf531f8b..48224fc4be97 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list credential sets for a container registry. */ -@Fluent +@Immutable public final class CredentialSetListResult implements JsonSerializable { /* * The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the @@ -32,7 +32,7 @@ public final class CredentialSetListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of credential sets. Since this list may be incomplete, the nextLink field should - * be used to request the next list of credential sets. - * - * @param value the value value to set. - * @return the CredentialSetListResult object itself. - */ - public CredentialSetListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of credential sets. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of credential sets. - * - * @param nextLink the nextLink value to set. - * @return the CredentialSetListResult object itself. - */ - public CredentialSetListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java index 182bef2a348d..aa58c1f2eba1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list events for a webhook. */ -@Fluent +@Immutable public final class EventListResult implements JsonSerializable { /* * The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list @@ -32,7 +32,7 @@ public final class EventListResult implements JsonSerializable /** * Creates an instance of EventListResult class. */ - public EventListResult() { + private EventListResult() { } /** @@ -45,18 +45,6 @@ public List value() { return this.value; } - /** - * Set the value property: The list of events. Since this list may be incomplete, the nextLink field should be used - * to request the next list of events. - * - * @param value the value value to set. - * @return the EventListResult object itself. - */ - public EventListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of events. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of events. - * - * @param nextLink the nextLink value to set. - * @return the EventListResult object itself. - */ - public EventListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java index 7808edddb101..2fb75ef8e418 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list container registry operations. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* * The list of container registry operations. Since this list may be incomplete, the nextLink field should be used @@ -32,7 +32,7 @@ public final class OperationListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of container registry operations. Since this list may be incomplete, the - * nextLink field should be used to request the next list of operations. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of container registry operations. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of container registry operations. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpointConnectionListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpointConnectionListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java index 02bfbdb1a504..a10547b283d5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpointConnectionListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list private endpoint connections for a container registry. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* @@ -33,7 +33,7 @@ public final class PrivateEndpointConnectionListResult /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - public PrivateEndpointConnectionListResult() { + private PrivateEndpointConnectionListResult() { } /** @@ -46,18 +46,6 @@ public List value() { return this.value; } - /** - * Set the value property: The list of private endpoint connections. Since this list may be incomplete, the nextLink - * field should be used to request the next list of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of private endpoint connections. * @@ -67,17 +55,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of private endpoint connections. - * - * @param nextLink the nextLink value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkResourceListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkResourceListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java index e58a51e12463..73c589647ec5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkResourceListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list private link resources for a container registry. */ -@Fluent +@Immutable public final class PrivateLinkResourceListResult implements JsonSerializable { /* * The list of private link resources. Since this list may be incomplete, the nextLink field should be used to @@ -32,7 +32,7 @@ public final class PrivateLinkResourceListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of private link resources. Since this list may be incomplete, the nextLink field - * should be used to request the next list of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResult object itself. - */ - public PrivateLinkResourceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of private link resources. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of private link resources. - * - * @param nextLink the nextLink value to set. - * @return the PrivateLinkResourceListResult object itself. - */ - public PrivateLinkResourceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java index 3a9319a2aa17..683e48fa3619 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list container registries. */ -@Fluent +@Immutable public final class RegistryListResult implements JsonSerializable { /* * The list of container registries. Since this list may be incomplete, the nextLink field should be used to request @@ -32,7 +32,7 @@ public final class RegistryListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of container registries. Since this list may be incomplete, the nextLink field - * should be used to request the next list of container registries. - * - * @param value the value value to set. - * @return the RegistryListResult object itself. - */ - public RegistryListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of container registries. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of container registries. - * - * @param nextLink the nextLink value to set. - * @return the RegistryListResult object itself. - */ - public RegistryListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java index 30c11e3b9804..fbab95dd35b6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list replications for a container registry. */ -@Fluent +@Immutable public final class ReplicationListResult implements JsonSerializable { /* * The list of replications. Since this list may be incomplete, the nextLink field should be used to request the @@ -32,7 +32,7 @@ public final class ReplicationListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of replications. Since this list may be incomplete, the nextLink field should be - * used to request the next list of replications. - * - * @param value the value value to set. - * @return the ReplicationListResult object itself. - */ - public ReplicationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of replications. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of replications. - * - * @param nextLink the nextLink value to set. - * @return the ReplicationListResult object itself. - */ - public ReplicationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java index ba80536559fa..bafecbcfd3f3 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list scope maps for a container registry. */ -@Fluent +@Immutable public final class ScopeMapListResult implements JsonSerializable { /* * The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next @@ -32,7 +32,7 @@ public final class ScopeMapListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of scope maps. Since this list may be incomplete, the nextLink field should be - * used to request the next list of scope maps. - * - * @param value the value value to set. - * @return the ScopeMapListResult object itself. - */ - public ScopeMapListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of scope maps. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of scope maps. - * - * @param nextLink the nextLink value to set. - * @return the ScopeMapListResult object itself. - */ - public ScopeMapListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java index f9a3c432951a..da74dc1db9e5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list tokens for a container registry. */ -@Fluent +@Immutable public final class TokenListResult implements JsonSerializable { /* * The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list @@ -32,7 +32,7 @@ public final class TokenListResult implements JsonSerializable /** * Creates an instance of TokenListResult class. */ - public TokenListResult() { + private TokenListResult() { } /** @@ -45,18 +45,6 @@ public List value() { return this.value; } - /** - * Set the value property: The list of tokens. Since this list may be incomplete, the nextLink field should be used - * to request the next list of tokens. - * - * @param value the value value to set. - * @return the TokenListResult object itself. - */ - public TokenListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of tokens. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of tokens. - * - * @param nextLink the nextLink value to set. - * @return the TokenListResult object itself. - */ - public TokenListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java similarity index 77% rename from sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookListResult.java rename to sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java index cc39efdf1732..0c6ed6513e6e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerregistry.models; +package com.azure.resourcemanager.containerregistry.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The result of a request to list webhooks for a container registry. */ -@Fluent +@Immutable public final class WebhookListResult implements JsonSerializable { /* * The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next @@ -32,7 +32,7 @@ public final class WebhookListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of webhooks. Since this list may be incomplete, the nextLink field should be - * used to request the next list of webhooks. - * - * @param value the value value to set. - * @return the WebhookListResult object itself. - */ - public WebhookListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URI that can be used to request the next list of webhooks. * @@ -66,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of webhooks. - * - * @param nextLink the nextLink value to set. - * @return the WebhookListResult object itself. - */ - public WebhookListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java index e93e253cbd79..bde1f3f1a7af 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java index 285965f79e9e..e07b6d7040f4 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java index 6647c2548e03..7fc619a1af6c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; @@ -24,7 +24,7 @@ public final class ActivationProperties implements JsonSerializable { /* * The subject or username associated with the request context that generated the event. @@ -24,7 +24,7 @@ public final class Actor implements JsonSerializable { /** * Creates an instance of Actor class. */ - public Actor() { + private Actor() { } /** @@ -36,17 +36,6 @@ public String name() { return this.name; } - /** - * Set the name property: The subject or username associated with the request context that generated the event. - * - * @param name the name value to set. - * @return the Actor object itself. - */ - public Actor withName(String name) { - this.name = name; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java index 02764c5a9d77..779072d27578 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java index a099295fe0b9..a2da01722e70 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AutoGeneratedDomainNameLabelScope.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AutoGeneratedDomainNameLabelScope.java deleted file mode 100644 index 4c05f9a99936..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AutoGeneratedDomainNameLabelScope.java +++ /dev/null @@ -1,66 +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.containerregistry.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The auto generated domain name label of the container registry. This value defaults to "Unsecure". - */ -public final class AutoGeneratedDomainNameLabelScope extends ExpandableStringEnum { - /** - * Static value Unsecure for AutoGeneratedDomainNameLabelScope. - */ - public static final AutoGeneratedDomainNameLabelScope UNSECURE = fromString("Unsecure"); - - /** - * Static value TenantReuse for AutoGeneratedDomainNameLabelScope. - */ - public static final AutoGeneratedDomainNameLabelScope TENANT_REUSE = fromString("TenantReuse"); - - /** - * Static value SubscriptionReuse for AutoGeneratedDomainNameLabelScope. - */ - public static final AutoGeneratedDomainNameLabelScope SUBSCRIPTION_REUSE = fromString("SubscriptionReuse"); - - /** - * Static value ResourceGroupReuse for AutoGeneratedDomainNameLabelScope. - */ - public static final AutoGeneratedDomainNameLabelScope RESOURCE_GROUP_REUSE = fromString("ResourceGroupReuse"); - - /** - * Static value NoReuse for AutoGeneratedDomainNameLabelScope. - */ - public static final AutoGeneratedDomainNameLabelScope NO_REUSE = fromString("NoReuse"); - - /** - * Creates a new instance of AutoGeneratedDomainNameLabelScope value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutoGeneratedDomainNameLabelScope() { - } - - /** - * Creates or finds a AutoGeneratedDomainNameLabelScope from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutoGeneratedDomainNameLabelScope. - */ - public static AutoGeneratedDomainNameLabelScope fromString(String name) { - return fromString(name, AutoGeneratedDomainNameLabelScope.class); - } - - /** - * Gets known AutoGeneratedDomainNameLabelScope values. - * - * @return known AutoGeneratedDomainNameLabelScope values. - */ - public static Collection values() { - return values(AutoGeneratedDomainNameLabelScope.class); - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java index c89904235bc5..542c200f1829 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java index c4a868778abf..5050ad954146 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java index ae05e1e7737d..fef5626491fa 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java index 0a78ab722a0d..7cdd4454312e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java index cf7965fa8fb1..3e94a4702e25 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java index d1cd3fd7331a..75209f9ef838 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java index 2fc28e18bdaa..8eb9fb668da6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java index 4bf42149ec24..26595f93cbf6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java new file mode 100644 index 000000000000..33580bc36f23 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +/** + * The resource type for Container Registry. + */ +public enum ContainerRegistryResourceType { + /** + * Enum value Microsoft.ContainerRegistry/registries. + */ + MICROSOFT_CONTAINER_REGISTRY_REGISTRIES("Microsoft.ContainerRegistry/registries"); + + /** + * The actual serialized value for a ContainerRegistryResourceType instance. + */ + private final String value; + + ContainerRegistryResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ContainerRegistryResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed ContainerRegistryResourceType object, or null if unable to parse. + */ + public static ContainerRegistryResourceType fromString(String value) { + if (value == null) { + return null; + } + ContainerRegistryResourceType[] items = ContainerRegistryResourceType.values(); + for (ContainerRegistryResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java index 62373058bfe3..49702cdb9bb5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The health of the auth credential. */ -@Fluent +@Immutable public final class CredentialHealth implements JsonSerializable { /* * The health status of credential. @@ -34,7 +34,7 @@ public final class CredentialHealth implements JsonSerializable { /* * The event ID. @@ -59,7 +59,7 @@ public final class EventContent implements JsonSerializable { /** * Creates an instance of EventContent class. */ - public EventContent() { + private EventContent() { } /** @@ -71,17 +71,6 @@ public String id() { return this.id; } - /** - * Set the id property: The event ID. - * - * @param id the id value to set. - * @return the EventContent object itself. - */ - public EventContent withId(String id) { - this.id = id; - return this; - } - /** * Get the timestamp property: The time at which the event occurred. * @@ -91,17 +80,6 @@ public OffsetDateTime timestamp() { return this.timestamp; } - /** - * Set the timestamp property: The time at which the event occurred. - * - * @param timestamp the timestamp value to set. - * @return the EventContent object itself. - */ - public EventContent withTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - /** * Get the action property: The action that encompasses the provided event. * @@ -111,17 +89,6 @@ public String action() { return this.action; } - /** - * Set the action property: The action that encompasses the provided event. - * - * @param action the action value to set. - * @return the EventContent object itself. - */ - public EventContent withAction(String action) { - this.action = action; - return this; - } - /** * Get the target property: The target of the event. * @@ -131,17 +98,6 @@ public Target target() { return this.target; } - /** - * Set the target property: The target of the event. - * - * @param target the target value to set. - * @return the EventContent object itself. - */ - public EventContent withTarget(Target target) { - this.target = target; - return this; - } - /** * Get the request property: The request that generated the event. * @@ -151,17 +107,6 @@ public Request request() { return this.request; } - /** - * Set the request property: The request that generated the event. - * - * @param request the request value to set. - * @return the EventContent object itself. - */ - public EventContent withRequest(Request request) { - this.request = request; - return this; - } - /** * Get the actor property: The agent that initiated the event. For most situations, this could be from the * authorization context of the request. @@ -172,18 +117,6 @@ public Actor actor() { return this.actor; } - /** - * Set the actor property: The agent that initiated the event. For most situations, this could be from the - * authorization context of the request. - * - * @param actor the actor value to set. - * @return the EventContent object itself. - */ - public EventContent withActor(Actor actor) { - this.actor = actor; - return this; - } - /** * Get the source property: The registry node that generated the event. Put differently, while the actor initiates * the event, the source generates it. @@ -194,18 +127,6 @@ public Source source() { return this.source; } - /** - * Set the source property: The registry node that generated the event. Put differently, while the actor initiates - * the event, the source generates it. - * - * @param source the source value to set. - * @return the EventContent object itself. - */ - public EventContent withSource(Source source) { - this.source = source; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java index a9f5c558593a..141b70797a73 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The event request message sent to the service URI. */ -@Fluent +@Immutable public final class EventRequestMessage implements JsonSerializable { /* * The content of the event request message. @@ -45,7 +45,7 @@ public final class EventRequestMessage implements JsonSerializable headers() { return this.headers; } - /** - * Set the headers property: The headers of the event request message. - * - * @param headers the headers value to set. - * @return the EventRequestMessage object itself. - */ - public EventRequestMessage withHeaders(Map headers) { - this.headers = headers; - return this; - } - /** * Get the method property: The HTTP method used to send the event request message. * @@ -97,17 +75,6 @@ public String method() { return this.method; } - /** - * Set the method property: The HTTP method used to send the event request message. - * - * @param method the method value to set. - * @return the EventRequestMessage object itself. - */ - public EventRequestMessage withMethod(String method) { - this.method = method; - return this; - } - /** * Get the requestUri property: The URI used to send the event request message. * @@ -117,17 +84,6 @@ public String requestUri() { return this.requestUri; } - /** - * Set the requestUri property: The URI used to send the event request message. - * - * @param requestUri the requestUri value to set. - * @return the EventRequestMessage object itself. - */ - public EventRequestMessage withRequestUri(String requestUri) { - this.requestUri = requestUri; - return this; - } - /** * Get the version property: The HTTP message version. * @@ -137,17 +93,6 @@ public String version() { return this.version; } - /** - * Set the version property: The HTTP message version. - * - * @param version the version value to set. - * @return the EventRequestMessage object itself. - */ - public EventRequestMessage withVersion(String version) { - this.version = version; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java index 3d9bf42b8a45..6c9c311b2c68 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The event response message received from the service URI. */ -@Fluent +@Immutable public final class EventResponseMessage implements JsonSerializable { /* * The content of the event response message. @@ -45,7 +45,7 @@ public final class EventResponseMessage implements JsonSerializable headers() { return this.headers; } - /** - * Set the headers property: The headers of the event response message. - * - * @param headers the headers value to set. - * @return the EventResponseMessage object itself. - */ - public EventResponseMessage withHeaders(Map headers) { - this.headers = headers; - return this; - } - /** * Get the reasonPhrase property: The reason phrase of the event response message. * @@ -97,17 +75,6 @@ public String reasonPhrase() { return this.reasonPhrase; } - /** - * Set the reasonPhrase property: The reason phrase of the event response message. - * - * @param reasonPhrase the reasonPhrase value to set. - * @return the EventResponseMessage object itself. - */ - public EventResponseMessage withReasonPhrase(String reasonPhrase) { - this.reasonPhrase = reasonPhrase; - return this; - } - /** * Get the statusCode property: The status code of the event response message. * @@ -117,17 +84,6 @@ public String statusCode() { return this.statusCode; } - /** - * Set the statusCode property: The status code of the event response message. - * - * @param statusCode the statusCode value to set. - * @return the EventResponseMessage object itself. - */ - public EventResponseMessage withStatusCode(String statusCode) { - this.statusCode = statusCode; - return this; - } - /** * Get the version property: The HTTP message version. * @@ -137,17 +93,6 @@ public String version() { return this.version; } - /** - * Set the version property: The HTTP message version. - * - * @param version the version value to set. - * @return the EventResponseMessage object itself. - */ - public EventResponseMessage withVersion(String version) { - this.version = version; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java index f9b79d5e9c0d..78c6b7775b57 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java index cabf58bef6bc..5b793a9a995f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java index 5ca4f17c3431..76371e07a7cb 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java index 130210282096..d81ee406ae9b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java index 327e344409f9..4f127477f128 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java index 7e4cfb76569c..2a49c37801ed 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java index 9a038eab9dcd..8738efbec549 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java index 9af568079df8..6aa0e15c0beb 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java index f2e0d01c557f..86d624369fb5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java index 38eed601ad8f..83a490e19428 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java index 47db4e5b70fb..208336565590 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java index ff425e705b77..d785d7abc551 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java index b7f7ef8d59d8..226eccd0a72e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java index 36ae391a957d..74590745a7c0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java index 2e30841a9d8d..cb2e24114dab 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java index 51bf72aaef73..f366571c4d60 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java index 0ef4de56fe25..5be56c9ffda7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The display information for a container registry operation. */ -@Fluent +@Immutable public final class OperationDisplayDefinition implements JsonSerializable { /* * The resource provider name: Microsoft.ContainerRegistry. @@ -39,7 +39,7 @@ public final class OperationDisplayDefinition implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class OperationLogSpecificationDefinition /** * Creates an instance of OperationLogSpecificationDefinition class. */ - public OperationLogSpecificationDefinition() { + private OperationLogSpecificationDefinition() { } /** @@ -47,17 +47,6 @@ public String name() { return this.name; } - /** - * Set the name property: Log name. - * - * @param name the name value to set. - * @return the OperationLogSpecificationDefinition object itself. - */ - public OperationLogSpecificationDefinition withName(String name) { - this.name = name; - return this; - } - /** * Get the displayName property: Log display name. * @@ -67,17 +56,6 @@ public String displayName() { return this.displayName; } - /** - * Set the displayName property: Log display name. - * - * @param displayName the displayName value to set. - * @return the OperationLogSpecificationDefinition object itself. - */ - public OperationLogSpecificationDefinition withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - /** * Get the blobDuration property: Log blob duration. * @@ -87,17 +65,6 @@ public String blobDuration() { return this.blobDuration; } - /** - * Set the blobDuration property: Log blob duration. - * - * @param blobDuration the blobDuration value to set. - * @return the OperationLogSpecificationDefinition object itself. - */ - public OperationLogSpecificationDefinition withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java index 57f7a5b2b5ce..5d32b184f331 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The definition of Azure Monitoring metric. */ -@Fluent +@Immutable public final class OperationMetricSpecificationDefinition implements JsonSerializable { /* @@ -50,7 +50,7 @@ public final class OperationMetricSpecificationDefinition /** * Creates an instance of OperationMetricSpecificationDefinition class. */ - public OperationMetricSpecificationDefinition() { + private OperationMetricSpecificationDefinition() { } /** @@ -62,17 +62,6 @@ public String name() { return this.name; } - /** - * Set the name property: Metric name. - * - * @param name the name value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withName(String name) { - this.name = name; - return this; - } - /** * Get the displayName property: Metric display name. * @@ -82,17 +71,6 @@ public String displayName() { return this.displayName; } - /** - * Set the displayName property: Metric display name. - * - * @param displayName the displayName value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - /** * Get the displayDescription property: Metric description. * @@ -102,17 +80,6 @@ public String displayDescription() { return this.displayDescription; } - /** - * Set the displayDescription property: Metric description. - * - * @param displayDescription the displayDescription value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withDisplayDescription(String displayDescription) { - this.displayDescription = displayDescription; - return this; - } - /** * Get the unit property: Metric unit. * @@ -122,17 +89,6 @@ public String unit() { return this.unit; } - /** - * Set the unit property: Metric unit. - * - * @param unit the unit value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withUnit(String unit) { - this.unit = unit; - return this; - } - /** * Get the aggregationType property: Metric aggregation type. * @@ -142,17 +98,6 @@ public String aggregationType() { return this.aggregationType; } - /** - * Set the aggregationType property: Metric aggregation type. - * - * @param aggregationType the aggregationType value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - /** * Get the internalMetricName property: Internal metric name. * @@ -162,17 +107,6 @@ public String internalMetricName() { return this.internalMetricName; } - /** - * Set the internalMetricName property: Internal metric name. - * - * @param internalMetricName the internalMetricName value to set. - * @return the OperationMetricSpecificationDefinition object itself. - */ - public OperationMetricSpecificationDefinition withInternalMetricName(String internalMetricName) { - this.internalMetricName = internalMetricName; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java index 23bbddb023c3..98b136b15c4a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The definition of Azure Monitoring list. */ -@Fluent +@Immutable public final class OperationServiceSpecificationDefinition implements JsonSerializable { /* @@ -31,7 +31,7 @@ public final class OperationServiceSpecificationDefinition /** * Creates an instance of OperationServiceSpecificationDefinition class. */ - public OperationServiceSpecificationDefinition() { + private OperationServiceSpecificationDefinition() { } /** @@ -43,18 +43,6 @@ public List metricSpecifications() { return this.metricSpecifications; } - /** - * Set the metricSpecifications property: A list of Azure Monitoring metrics definition. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the OperationServiceSpecificationDefinition object itself. - */ - public OperationServiceSpecificationDefinition - withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - /** * Get the logSpecifications property: A list of Azure Monitoring log definitions. * @@ -64,18 +52,6 @@ public List logSpecifications() { return this.logSpecifications; } - /** - * Set the logSpecifications property: A list of Azure Monitoring log definitions. - * - * @param logSpecifications the logSpecifications value to set. - * @return the OperationServiceSpecificationDefinition object itself. - */ - public OperationServiceSpecificationDefinition - withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java index 3e77e6ee19a9..9d8feb73e745 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java index 70fa820de849..63213fbfffbe 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java index 8b8e68a75e26..18bff10d89f7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java index 8e0ba36f7bd5..a039d4d21bfe 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java index aed255e42645..d7d24573fcda 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java index 8b1696d0e621..b1461f38c8ac 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java index 40132038f31f..58816837b615 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java index 70b26d621385..ad52001771c9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java index 941f91e1e678..fb0542cf781a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java index 99e1ad6dcf11..084665f203d0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java index b3e1fe8940e6..66d4ab85c035 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; @@ -25,17 +25,7 @@ public final class RegistryNameCheckRequest implements JsonSerializable { /* * The password name. @@ -29,7 +29,7 @@ public final class RegistryPassword implements JsonSerializable { /* * The name of the usage. @@ -39,7 +39,7 @@ public final class RegistryUsage implements JsonSerializable { /** * Creates an instance of RegistryUsage class. */ - public RegistryUsage() { + private RegistryUsage() { } /** @@ -51,17 +51,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the usage. - * - * @param name the name value to set. - * @return the RegistryUsage object itself. - */ - public RegistryUsage withName(String name) { - this.name = name; - return this; - } - /** * Get the limit property: The limit of the usage. * @@ -71,17 +60,6 @@ public Long limit() { return this.limit; } - /** - * Set the limit property: The limit of the usage. - * - * @param limit the limit value to set. - * @return the RegistryUsage object itself. - */ - public RegistryUsage withLimit(Long limit) { - this.limit = limit; - return this; - } - /** * Get the currentValue property: The current value of the usage. * @@ -91,17 +69,6 @@ public Long currentValue() { return this.currentValue; } - /** - * Set the currentValue property: The current value of the usage. - * - * @param currentValue the currentValue value to set. - * @return the RegistryUsage object itself. - */ - public RegistryUsage withCurrentValue(Long currentValue) { - this.currentValue = currentValue; - return this; - } - /** * Get the unit property: The unit of measurement. * @@ -111,17 +78,6 @@ public RegistryUsageUnit unit() { return this.unit; } - /** - * Set the unit property: The unit of measurement. - * - * @param unit the unit value to set. - * @return the RegistryUsage object itself. - */ - public RegistryUsage withUnit(RegistryUsageUnit unit) { - this.unit = unit; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java index 4f64fb5c0000..7643cfc71b46 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java index 7c812766266c..12dcaf9ed773 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java index 5d194017b792..7caf6d7d3fa1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The request that generated the event. */ -@Fluent +@Immutable public final class Request implements JsonSerializable { /* * The ID of the request that initiated the event. @@ -46,7 +46,7 @@ public final class Request implements JsonSerializable { /** * Creates an instance of Request class. */ - public Request() { + private Request() { } /** @@ -58,17 +58,6 @@ public String id() { return this.id; } - /** - * Set the id property: The ID of the request that initiated the event. - * - * @param id the id value to set. - * @return the Request object itself. - */ - public Request withId(String id) { - this.id = id; - return this; - } - /** * Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event. * This is the RemoteAddr from the standard http request. @@ -79,18 +68,6 @@ public String addr() { return this.addr; } - /** - * Set the addr property: The IP or hostname and possibly port of the client connection that initiated the event. - * This is the RemoteAddr from the standard http request. - * - * @param addr the addr value to set. - * @return the Request object itself. - */ - public Request withAddr(String addr) { - this.addr = addr; - return this; - } - /** * Get the host property: The externally accessible hostname of the registry instance, as specified by the http host * header on incoming requests. @@ -101,18 +78,6 @@ public String host() { return this.host; } - /** - * Set the host property: The externally accessible hostname of the registry instance, as specified by the http host - * header on incoming requests. - * - * @param host the host value to set. - * @return the Request object itself. - */ - public Request withHost(String host) { - this.host = host; - return this; - } - /** * Get the method property: The request method that generated the event. * @@ -122,17 +87,6 @@ public String method() { return this.method; } - /** - * Set the method property: The request method that generated the event. - * - * @param method the method value to set. - * @return the Request object itself. - */ - public Request withMethod(String method) { - this.method = method; - return this; - } - /** * Get the useragent property: The user agent header of the request. * @@ -142,17 +96,6 @@ public String useragent() { return this.useragent; } - /** - * Set the useragent property: The user agent header of the request. - * - * @param useragent the useragent value to set. - * @return the Request object itself. - */ - public Request withUseragent(String useragent) { - this.useragent = useragent; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java index 1028cd216fc1..4e14f2b0d05e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java index b946c9fbc5ca..bb9516ade289 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java index 13646f602378..33b6f215c909 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java index e93ca41e3bab..beb398b5694a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java index 66fe5513df66..27dee01f7421 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java index fcb2c6f53d65..5f7b2af81389 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java index aba192ab15aa..e02642fe7d5b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java index a610781f93d8..6c87b54a5d8c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ * The registry node that generated the event. Put differently, while the actor initiates the event, the source * generates it. */ -@Fluent +@Immutable public final class Source implements JsonSerializable { /* * The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved @@ -26,12 +26,12 @@ public final class Source implements JsonSerializable { /* * The running instance of an application. Changes after each restart. */ - private String instanceId; + private String instanceID; /** * Creates an instance of Source class. */ - public Source() { + private Source() { } /** @@ -45,35 +45,12 @@ public String addr() { } /** - * Set the addr property: The IP or hostname and the port of the registry node that generated the event. Generally, - * this will be resolved by os.Hostname() along with the running port. - * - * @param addr the addr value to set. - * @return the Source object itself. - */ - public Source withAddr(String addr) { - this.addr = addr; - return this; - } - - /** - * Get the instanceId property: The running instance of an application. Changes after each restart. - * - * @return the instanceId value. - */ - public String instanceId() { - return this.instanceId; - } - - /** - * Set the instanceId property: The running instance of an application. Changes after each restart. + * Get the instanceID property: The running instance of an application. Changes after each restart. * - * @param instanceId the instanceId value to set. - * @return the Source object itself. + * @return the instanceID value. */ - public Source withInstanceId(String instanceId) { - this.instanceId = instanceId; - return this; + public String instanceID() { + return this.instanceID; } /** @@ -91,7 +68,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("addr", this.addr); - jsonWriter.writeStringField("instanceID", this.instanceId); + jsonWriter.writeStringField("instanceID", this.instanceID); return jsonWriter.writeEndObject(); } @@ -113,7 +90,7 @@ public static Source fromJson(JsonReader jsonReader) throws IOException { if ("addr".equals(fieldName)) { deserializedSource.addr = reader.getString(); } else if ("instanceID".equals(fieldName)) { - deserializedSource.instanceId = reader.getString(); + deserializedSource.instanceID = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java index c395f3cb0927..0f874cf235b6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; @@ -36,7 +36,7 @@ public final class Status implements JsonSerializable { /** * Creates an instance of Status class. */ - public Status() { + private Status() { } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java index 475d9ec9e8d6..7226b4dab66b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; @@ -46,7 +46,7 @@ public final class StatusDetailProperties implements JsonSerializable { /* * The MIME type of the referenced object. @@ -64,7 +64,7 @@ public final class Target implements JsonSerializable { /** * Creates an instance of Target class. */ - public Target() { + private Target() { } /** @@ -76,17 +76,6 @@ public String mediaType() { return this.mediaType; } - /** - * Set the mediaType property: The MIME type of the referenced object. - * - * @param mediaType the mediaType value to set. - * @return the Target object itself. - */ - public Target withMediaType(String mediaType) { - this.mediaType = mediaType; - return this; - } - /** * Get the size property: The number of bytes of the content. Same as Length field. * @@ -96,17 +85,6 @@ public Long size() { return this.size; } - /** - * Set the size property: The number of bytes of the content. Same as Length field. - * - * @param size the size value to set. - * @return the Target object itself. - */ - public Target withSize(Long size) { - this.size = size; - return this; - } - /** * Get the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. * @@ -116,17 +94,6 @@ public String digest() { return this.digest; } - /** - * Set the digest property: The digest of the content, as defined by the Registry V2 HTTP API Specification. - * - * @param digest the digest value to set. - * @return the Target object itself. - */ - public Target withDigest(String digest) { - this.digest = digest; - return this; - } - /** * Get the length property: The number of bytes of the content. Same as Size field. * @@ -136,17 +103,6 @@ public Long length() { return this.length; } - /** - * Set the length property: The number of bytes of the content. Same as Size field. - * - * @param length the length value to set. - * @return the Target object itself. - */ - public Target withLength(Long length) { - this.length = length; - return this; - } - /** * Get the repository property: The repository name. * @@ -156,17 +112,6 @@ public String repository() { return this.repository; } - /** - * Set the repository property: The repository name. - * - * @param repository the repository value to set. - * @return the Target object itself. - */ - public Target withRepository(String repository) { - this.repository = repository; - return this; - } - /** * Get the url property: The direct URL to the content. * @@ -176,17 +121,6 @@ public String url() { return this.url; } - /** - * Set the url property: The direct URL to the content. - * - * @param url the url value to set. - * @return the Target object itself. - */ - public Target withUrl(String url) { - this.url = url; - return this; - } - /** * Get the tag property: The tag name. * @@ -196,17 +130,6 @@ public String tag() { return this.tag; } - /** - * Set the tag property: The tag name. - * - * @param tag the tag value to set. - * @return the Target object itself. - */ - public Target withTag(String tag) { - this.tag = tag; - return this; - } - /** * Get the name property: The name of the artifact. * @@ -216,17 +139,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the artifact. - * - * @param name the name value to set. - * @return the Target object itself. - */ - public Target withName(String name) { - this.name = name; - return this; - } - /** * Get the version property: The version of the artifact. * @@ -236,17 +148,6 @@ public String version() { return this.version; } - /** - * Set the version property: The version of the artifact. - * - * @param version the version value to set. - * @return the Target object itself. - */ - public Target withVersion(String version) { - this.version = version; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java index 820fc0de05e7..aad4a246fa4d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; @@ -29,7 +29,7 @@ public final class TlsCertificateProperties implements JsonSerializable { /** * Creates an instance of TlsProperties class. */ - public TlsProperties() { + private TlsProperties() { } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java index 1fb1f48cdb65..ddd5d5b83f30 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java index 199078acbf66..5b0d8d71badd 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java index 912b9180a520..f7d9c3616128 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java index a36a07d939c9..15ad30c1086c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java index 8f7eb124f48e..77c17465ce77 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java index da7584cabcc9..b2aa04ca055e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java index c9d699557be2..465cc7784e07 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java index d4130f0f98c6..f4c7f46b2703 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java index 26b8550fb5f2..cf37afc424c9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java index 6db35bd5f959..d212f49a5698 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java index 99ed6e3e07de..9c05490a9d5e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java index 0907a03740e3..fed6bcbcb637 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java index 13aecbe4bd47..67ad10f2d04c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java index e23a6653a781..0f54bf2a4b13 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java index 54d7d0146226..91371ef82a1a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java index 12ffd8ab556e..09c8028b4821 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.models; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java index b0ff976eda83..b91986cdc2dc 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for ContainerRegistryManagementClient. + * Package containing the data models for ContainerRegistry. * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry * components. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/package-info.java index 75381ac532e0..e411c3cfcc0e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/package-info.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for ContainerRegistryManagementClient. + * Package containing the classes for ContainerRegistry. * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry * components. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json new file mode 100644 index 000000000000..e3c9f06542bb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-11-01","generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryUsageListResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Actor.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventContent.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java","src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationLogSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java","src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Target.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json deleted file mode 100644 index b056823a26c0..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.containerregistry.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistryTasksClientImpl$RegistryTasksService"],["com.azure.resourcemanager.containerregistry.implementation.RunsClientImpl$RunsService"],["com.azure.resourcemanager.containerregistry.implementation.TaskRunsClientImpl$TaskRunsService"],["com.azure.resourcemanager.containerregistry.implementation.TasksClientImpl$TasksService"]] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActivationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActivationPropertiesTests.java new file mode 100644 index 000000000000..1f154069f00e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActivationPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ActivationProperties; + +public final class ActivationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivationProperties model + = BinaryData.fromString("{\"status\":\"Active\"}").toObject(ActivationProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java new file mode 100644 index 000000000000..a7c887f2dfbb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Actor; +import org.junit.jupiter.api.Assertions; + +public final class ActorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Actor model = BinaryData.fromString("{\"name\":\"minrfdw\"}").toObject(Actor.class); + Assertions.assertEquals("minrfdw", model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/AzureADAuthenticationAsArmPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/AzureADAuthenticationAsArmPolicyTests.java new file mode 100644 index 000000000000..95a876088e5c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/AzureADAuthenticationAsArmPolicyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.AzureADAuthenticationAsArmPolicy; +import com.azure.resourcemanager.containerregistry.models.AzureADAuthenticationAsArmPolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class AzureADAuthenticationAsArmPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureADAuthenticationAsArmPolicy model + = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(AzureADAuthenticationAsArmPolicy.class); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureADAuthenticationAsArmPolicy model + = new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(AzureADAuthenticationAsArmPolicy.class); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java new file mode 100644 index 000000000000..43c60c12747c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.CallbackConfigInner; +import org.junit.jupiter.api.Assertions; + +public final class CallbackConfigInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CallbackConfigInner model = BinaryData.fromString( + "{\"serviceUri\":\"wem\",\"customHeaders\":{\"sfgytguslfead\":\"ncsdtclusiyp\",\"isxgfp\":\"ygqukyhejh\",\"vk\":\"lolp\"}}") + .toObject(CallbackConfigInner.class); + Assertions.assertEquals("wem", model.serviceUri()); + Assertions.assertEquals("ncsdtclusiyp", model.customHeaders().get("sfgytguslfead")); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java new file mode 100644 index 000000000000..46dfdf51c516 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.EventContent; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EventContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventContent model = BinaryData.fromString( + "{\"id\":\"sgsahmkycgr\",\"timestamp\":\"2021-04-05T08:15:46Z\",\"action\":\"uetae\",\"target\":{\"mediaType\":\"u\",\"size\":7946094316421332336,\"digest\":\"s\",\"length\":122203340642919775,\"repository\":\"ab\",\"url\":\"oefki\",\"tag\":\"vtpuqujmqlgk\",\"name\":\"tndoaongbjc\",\"version\":\"ujitcjedftww\"},\"request\":{\"id\":\"kojvd\",\"addr\":\"zfoqouicybxar\",\"host\":\"szufoxciqopidoa\",\"method\":\"iodhkhazxkhnz\",\"useragent\":\"nlwntoe\"},\"actor\":{\"name\":\"dwbwhkszzcmrvexz\"},\"source\":{\"addr\":\"t\",\"instanceID\":\"sfraoyzko\"}}") + .toObject(EventContent.class); + Assertions.assertEquals("sgsahmkycgr", model.id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.timestamp()); + Assertions.assertEquals("uetae", model.action()); + Assertions.assertEquals("u", model.target().mediaType()); + Assertions.assertEquals(7946094316421332336L, model.target().size()); + Assertions.assertEquals("s", model.target().digest()); + Assertions.assertEquals(122203340642919775L, model.target().length()); + Assertions.assertEquals("ab", model.target().repository()); + Assertions.assertEquals("oefki", model.target().url()); + Assertions.assertEquals("vtpuqujmqlgk", model.target().tag()); + Assertions.assertEquals("tndoaongbjc", model.target().name()); + Assertions.assertEquals("ujitcjedftww", model.target().version()); + Assertions.assertEquals("kojvd", model.request().id()); + Assertions.assertEquals("zfoqouicybxar", model.request().addr()); + Assertions.assertEquals("szufoxciqopidoa", model.request().host()); + Assertions.assertEquals("iodhkhazxkhnz", model.request().method()); + Assertions.assertEquals("nlwntoe", model.request().useragent()); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.actor().name()); + Assertions.assertEquals("t", model.source().addr()); + Assertions.assertEquals("sfraoyzko", model.source().instanceID()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java new file mode 100644 index 000000000000..ed984a7bd79f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.EventInfoInner; +import org.junit.jupiter.api.Assertions; + +public final class EventInfoInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventInfoInner model = BinaryData.fromString("{\"id\":\"osjswsr\"}").toObject(EventInfoInner.class); + Assertions.assertEquals("osjswsr", model.id()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java new file mode 100644 index 000000000000..2e2908ba07c7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.EventRequestMessage; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EventRequestMessageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventRequestMessage model = BinaryData.fromString( + "{\"content\":{\"id\":\"wnujhemmsbvdk\",\"timestamp\":\"2021-11-07T07:11:51Z\",\"action\":\"tjinf\",\"target\":{\"mediaType\":\"fltkacjv\",\"size\":6490344131392989957,\"digest\":\"foakgg\",\"length\":5309095811404897814,\"repository\":\"ao\",\"url\":\"ulpqblylsyxkqjn\",\"tag\":\"ervtiagxs\",\"name\":\"zuempsbzkf\",\"version\":\"eyvpnqicvinvkj\"},\"request\":{\"id\":\"xrbuukzclew\",\"addr\":\"mlwpazt\",\"host\":\"ofncckwyfzqwhxxb\",\"method\":\"qa\",\"useragent\":\"feqztppriol\"},\"actor\":{\"name\":\"jaltolmnc\"},\"source\":{\"addr\":\"bqwcsdbnwdcf\",\"instanceID\":\"cqdpfuv\"}},\"headers\":{\"anvx\":\"bjj\",\"xqtvcofu\":\"vtvudutncormr\"},\"method\":\"lvkgju\",\"requestUri\":\"dknnqvsazn\",\"version\":\"tor\"}") + .toObject(EventRequestMessage.class); + Assertions.assertEquals("wnujhemmsbvdk", model.content().id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T07:11:51Z"), model.content().timestamp()); + Assertions.assertEquals("tjinf", model.content().action()); + Assertions.assertEquals("fltkacjv", model.content().target().mediaType()); + Assertions.assertEquals(6490344131392989957L, model.content().target().size()); + Assertions.assertEquals("foakgg", model.content().target().digest()); + Assertions.assertEquals(5309095811404897814L, model.content().target().length()); + Assertions.assertEquals("ao", model.content().target().repository()); + Assertions.assertEquals("ulpqblylsyxkqjn", model.content().target().url()); + Assertions.assertEquals("ervtiagxs", model.content().target().tag()); + Assertions.assertEquals("zuempsbzkf", model.content().target().name()); + Assertions.assertEquals("eyvpnqicvinvkj", model.content().target().version()); + Assertions.assertEquals("xrbuukzclew", model.content().request().id()); + Assertions.assertEquals("mlwpazt", model.content().request().addr()); + Assertions.assertEquals("ofncckwyfzqwhxxb", model.content().request().host()); + Assertions.assertEquals("qa", model.content().request().method()); + Assertions.assertEquals("feqztppriol", model.content().request().useragent()); + Assertions.assertEquals("jaltolmnc", model.content().actor().name()); + Assertions.assertEquals("bqwcsdbnwdcf", model.content().source().addr()); + Assertions.assertEquals("cqdpfuv", model.content().source().instanceID()); + Assertions.assertEquals("bjj", model.headers().get("anvx")); + Assertions.assertEquals("lvkgju", model.method()); + Assertions.assertEquals("dknnqvsazn", model.requestUri()); + Assertions.assertEquals("tor", model.version()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ExportPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ExportPolicyTests.java new file mode 100644 index 000000000000..917c261ddfff --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ExportPolicyTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ExportPolicy; +import com.azure.resourcemanager.containerregistry.models.ExportPolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class ExportPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportPolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(ExportPolicy.class); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportPolicy model = new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ExportPolicy.class); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java new file mode 100644 index 000000000000..22f16ac29e79 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.GarbageCollectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GarbageCollectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":true,\"schedule\":\"kfssxqukkf\"}") + .toObject(GarbageCollectionProperties.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("kfssxqukkf", model.schedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GarbageCollectionProperties model + = new GarbageCollectionProperties().withEnabled(true).withSchedule("kfssxqukkf"); + model = BinaryData.fromObject(model).toObject(GarbageCollectionProperties.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("kfssxqukkf", model.schedule()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IdentityPropertiesTests.java new file mode 100644 index 000000000000..c67e2f8aaa77 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IdentityPropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.ResourceIdentityType; +import com.azure.resourcemanager.containerregistry.models.UserIdentityProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class IdentityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentityProperties model = BinaryData.fromString( + "{\"principalId\":\"ewmdw\",\"tenantId\":\"eiachboosflnr\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wjdk\":{\"principalId\":\"eeh\",\"clientId\":\"vypyqrimzinpv\"},\"ifiyipjxsqwpgrj\":{\"principalId\":\"soodqxhcrmnoh\",\"clientId\":\"ckwhds\"}}}") + .toObject(IdentityProperties.class); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentityProperties model = new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("wjdk", new UserIdentityProperties(), "ifiyipjxsqwpgrj", new UserIdentityProperties())); + model = BinaryData.fromObject(model).toObject(IdentityProperties.class); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IpRuleTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IpRuleTests.java new file mode 100644 index 000000000000..34ad21290372 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/IpRuleTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Action; +import com.azure.resourcemanager.containerregistry.models.IpRule; +import org.junit.jupiter.api.Assertions; + +public final class IpRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpRule model = BinaryData.fromString("{\"action\":\"Allow\",\"value\":\"jyj\"}").toObject(IpRule.class); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("jyj", model.ipAddressOrRange()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpRule model = new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("jyj"); + model = BinaryData.fromObject(model).toObject(IpRule.class); + Assertions.assertEquals(Action.ALLOW, model.action()); + Assertions.assertEquals("jyj", model.ipAddressOrRange()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java new file mode 100644 index 000000000000..b1fa0a997354 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.AuditLogStatus; +import com.azure.resourcemanager.containerregistry.models.LogLevel; +import com.azure.resourcemanager.containerregistry.models.LoggingProperties; +import org.junit.jupiter.api.Assertions; + +public final class LoggingPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoggingProperties model = BinaryData.fromString("{\"logLevel\":\"Error\",\"auditLogStatus\":\"Enabled\"}") + .toObject(LoggingProperties.class); + Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoggingProperties model + = new LoggingProperties().withLogLevel(LogLevel.ERROR).withAuditLogStatus(AuditLogStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(LoggingProperties.class); + Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java new file mode 100644 index 000000000000..eff13b2184d8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.LoginServerProperties; + +public final class LoginServerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoginServerProperties model = BinaryData.fromString( + "{\"host\":\"jancu\",\"tls\":{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"xbniwdjs\"}}}") + .toObject(LoginServerProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoginServerProperties model = new LoginServerProperties(); + model = BinaryData.fromObject(model).toObject(LoginServerProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/NetworkRuleSetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/NetworkRuleSetTests.java new file mode 100644 index 000000000000..031114e41e09 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/NetworkRuleSetTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Action; +import com.azure.resourcemanager.containerregistry.models.DefaultAction; +import com.azure.resourcemanager.containerregistry.models.IpRule; +import com.azure.resourcemanager.containerregistry.models.NetworkRuleSet; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkRuleSetTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkRuleSet model = BinaryData + .fromString("{\"defaultAction\":\"Allow\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"fpsalgbqu\"}]}") + .toObject(NetworkRuleSet.class); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).ipAddressOrRange()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkRuleSet model = new NetworkRuleSet().withDefaultAction(DefaultAction.ALLOW) + .withIpRules(Arrays.asList(new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("fpsalgbqu"))); + model = BinaryData.fromObject(model).toObject(NetworkRuleSet.class); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + Assertions.assertEquals(Action.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("fpsalgbqu", model.ipRules().get(0).ipAddressOrRange()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDefinitionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDefinitionInnerTests.java new file mode 100644 index 000000000000..569cc3c77ab7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDefinitionInnerTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.OperationDefinitionInner; +import org.junit.jupiter.api.Assertions; + +public final class OperationDefinitionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDefinitionInner model = BinaryData.fromString( + "{\"origin\":\"smy\",\"name\":\"kdtmlxhekuk\",\"display\":{\"provider\":\"xukcdmpar\",\"resource\":\"y\",\"operation\":\"nzwuxzd\",\"description\":\"a\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hfpmrqobmtukknr\",\"displayName\":\"tihfx\",\"displayDescription\":\"jbpzvgnwzsymg\",\"unit\":\"uf\",\"aggregationType\":\"zk\",\"internalMetricName\":\"dbihanufhfcbj\"}],\"logSpecifications\":[{\"name\":\"ithxqhabifpi\",\"displayName\":\"wczbys\",\"blobDuration\":\"pqxu\"}]}},\"isDataAction\":false}") + .toObject(OperationDefinitionInner.class); + Assertions.assertEquals("smy", model.origin()); + Assertions.assertEquals("kdtmlxhekuk", model.name()); + Assertions.assertEquals("xukcdmpar", model.display().provider()); + Assertions.assertEquals("y", model.display().resource()); + Assertions.assertEquals("nzwuxzd", model.display().operation()); + Assertions.assertEquals("a", model.display().description()); + Assertions.assertFalse(model.isDataAction()); + Assertions.assertEquals("hfpmrqobmtukknr", model.serviceSpecification().metricSpecifications().get(0).name()); + Assertions.assertEquals("tihfx", model.serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("jbpzvgnwzsymg", + model.serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("uf", model.serviceSpecification().metricSpecifications().get(0).unit()); + Assertions.assertEquals("zk", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("dbihanufhfcbj", + model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("ithxqhabifpi", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("wczbys", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("pqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDisplayDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDisplayDefinitionTests.java new file mode 100644 index 000000000000..0c8fc89a643e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationDisplayDefinitionTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.OperationDisplayDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationDisplayDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplayDefinition model = BinaryData.fromString( + "{\"provider\":\"qniwbybrkxvdumj\",\"resource\":\"tfwvukxgaudc\",\"operation\":\"nhsjcnyej\",\"description\":\"ryhtnapczwlokjy\"}") + .toObject(OperationDisplayDefinition.class); + Assertions.assertEquals("qniwbybrkxvdumj", model.provider()); + Assertions.assertEquals("tfwvukxgaudc", model.resource()); + Assertions.assertEquals("nhsjcnyej", model.operation()); + Assertions.assertEquals("ryhtnapczwlokjy", model.description()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationListResultTests.java new file mode 100644 index 000000000000..fa2573918426 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"origin\":\"quvgjxpybczme\",\"name\":\"tzopbsphrupidgsy\",\"display\":{\"provider\":\"jhphoyc\",\"resource\":\"xaobhdxbmtqioqjz\",\"operation\":\"tbmufpo\",\"description\":\"oizh\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":true},{\"origin\":\"ijgkdm\",\"name\":\"azlobcufpdznrbt\",\"display\":{\"provider\":\"jnqglhqgnu\",\"resource\":\"oo\",\"operation\":\"wifsq\",\"description\":\"aagdfmg\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{}],\"logSpecifications\":[{},{}]}},\"isDataAction\":false},{\"origin\":\"wmrvktsizntocipa\",\"name\":\"ajpsquc\",\"display\":{\"provider\":\"yf\",\"resource\":\"fogknygjofjdde\",\"operation\":\"rd\",\"description\":\"pewnw\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{}]}},\"isDataAction\":false}],\"nextLink\":\"sarhmofc\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("quvgjxpybczme", model.value().get(0).origin()); + Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).name()); + Assertions.assertEquals("jhphoyc", model.value().get(0).display().provider()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().resource()); + Assertions.assertEquals("tbmufpo", model.value().get(0).display().operation()); + Assertions.assertEquals("oizh", model.value().get(0).display().description()); + Assertions.assertTrue(model.value().get(0).isDataAction()); + Assertions.assertEquals("sarhmofc", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationLogSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationLogSpecificationDefinitionTests.java new file mode 100644 index 000000000000..c58dd9298991 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationLogSpecificationDefinitionTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.OperationLogSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationLogSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationLogSpecificationDefinition model = BinaryData + .fromString("{\"name\":\"vmgxsab\",\"displayName\":\"qduujitcjczdz\",\"blobDuration\":\"ndhkrw\"}") + .toObject(OperationLogSpecificationDefinition.class); + Assertions.assertEquals("vmgxsab", model.name()); + Assertions.assertEquals("qduujitcjczdz", model.displayName()); + Assertions.assertEquals("ndhkrw", model.blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationMetricSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationMetricSpecificationDefinitionTests.java new file mode 100644 index 000000000000..d4886a5fbec5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationMetricSpecificationDefinitionTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.OperationMetricSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationMetricSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationMetricSpecificationDefinition model = BinaryData.fromString( + "{\"name\":\"lxxwrljdouskc\",\"displayName\":\"kocrcjdkwtnhx\",\"displayDescription\":\"jbiksqrglssai\",\"unit\":\"p\",\"aggregationType\":\"nzl\",\"internalMetricName\":\"fmppe\"}") + .toObject(OperationMetricSpecificationDefinition.class); + Assertions.assertEquals("lxxwrljdouskc", model.name()); + Assertions.assertEquals("kocrcjdkwtnhx", model.displayName()); + Assertions.assertEquals("jbiksqrglssai", model.displayDescription()); + Assertions.assertEquals("p", model.unit()); + Assertions.assertEquals("nzl", model.aggregationType()); + Assertions.assertEquals("fmppe", model.internalMetricName()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationPropertiesDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationPropertiesDefinitionTests.java new file mode 100644 index 000000000000..929d95dfda17 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationPropertiesDefinitionTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.OperationPropertiesDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationPropertiesDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationPropertiesDefinition model = BinaryData.fromString( + "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ni\",\"displayName\":\"oxzjnchgejspod\",\"displayDescription\":\"ilzyd\",\"unit\":\"o\",\"aggregationType\":\"yahux\",\"internalMetricName\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"displayName\":\"wmfdatscmdvpjhul\",\"displayDescription\":\"uvm\",\"unit\":\"ozkrwfndiodjpslw\",\"aggregationType\":\"dpvwryoqpsoaccta\",\"internalMetricName\":\"kljla\"},{\"name\":\"cr\",\"displayName\":\"fdfdosygexpa\",\"displayDescription\":\"akhmsbzjhcrz\",\"unit\":\"dphlxaolt\",\"aggregationType\":\"trg\",\"internalMetricName\":\"bpf\"}],\"logSpecifications\":[{\"name\":\"n\",\"displayName\":\"v\",\"blobDuration\":\"jrwzox\"}]}}") + .toObject(OperationPropertiesDefinition.class); + Assertions.assertEquals("ni", model.serviceSpecification().metricSpecifications().get(0).name()); + Assertions.assertEquals("oxzjnchgejspod", + model.serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("ilzyd", + model.serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("o", model.serviceSpecification().metricSpecifications().get(0).unit()); + Assertions.assertEquals("yahux", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("pmqnja", + model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("n", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("jrwzox", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationServiceSpecificationDefinitionTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationServiceSpecificationDefinitionTests.java new file mode 100644 index 000000000000..cf507ff61181 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/OperationServiceSpecificationDefinitionTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.OperationServiceSpecificationDefinition; +import org.junit.jupiter.api.Assertions; + +public final class OperationServiceSpecificationDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationServiceSpecificationDefinition model = BinaryData.fromString( + "{\"metricSpecifications\":[{\"name\":\"elluwfziton\",\"displayName\":\"qfpjk\",\"displayDescription\":\"xofpdvhpfxxypi\",\"unit\":\"nmayhuybb\",\"aggregationType\":\"odepoogin\",\"internalMetricName\":\"amiheognarxz\"},{\"name\":\"heotusiv\",\"displayName\":\"v\",\"displayDescription\":\"iqihn\",\"unit\":\"ngbwjz\",\"aggregationType\":\"fygxgispemvtzfk\",\"internalMetricName\":\"ubljofxqe\"}],\"logSpecifications\":[{\"name\":\"e\",\"displayName\":\"hqjbasvmsmj\",\"blobDuration\":\"lngsntnbybkzgcwr\"}]}") + .toObject(OperationServiceSpecificationDefinition.class); + Assertions.assertEquals("elluwfziton", model.metricSpecifications().get(0).name()); + Assertions.assertEquals("qfpjk", model.metricSpecifications().get(0).displayName()); + Assertions.assertEquals("xofpdvhpfxxypi", model.metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("nmayhuybb", model.metricSpecifications().get(0).unit()); + Assertions.assertEquals("odepoogin", model.metricSpecifications().get(0).aggregationType()); + Assertions.assertEquals("amiheognarxz", model.metricSpecifications().get(0).internalMetricName()); + Assertions.assertEquals("e", model.logSpecifications().get(0).name()); + Assertions.assertEquals("hqjbasvmsmj", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("lngsntnbybkzgcwr", model.logSpecifications().get(0).blobDuration()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PoliciesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PoliciesTests.java new file mode 100644 index 000000000000..7af4460b1e32 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PoliciesTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.AzureADAuthenticationAsArmPolicy; +import com.azure.resourcemanager.containerregistry.models.AzureADAuthenticationAsArmPolicyStatus; +import com.azure.resourcemanager.containerregistry.models.ExportPolicy; +import com.azure.resourcemanager.containerregistry.models.ExportPolicyStatus; +import com.azure.resourcemanager.containerregistry.models.Policies; +import com.azure.resourcemanager.containerregistry.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.models.QuarantinePolicy; +import com.azure.resourcemanager.containerregistry.models.RetentionPolicy; +import com.azure.resourcemanager.containerregistry.models.TrustPolicy; +import com.azure.resourcemanager.containerregistry.models.TrustPolicyType; +import org.junit.jupiter.api.Assertions; + +public final class PoliciesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Policies model = BinaryData.fromString( + "{\"quarantinePolicy\":{\"status\":\"disabled\"},\"trustPolicy\":{\"type\":\"Notary\",\"status\":\"enabled\"},\"retentionPolicy\":{\"days\":1951867342,\"lastUpdatedTime\":\"2021-10-31T08:55:11Z\",\"status\":\"enabled\"},\"exportPolicy\":{\"status\":\"enabled\"},\"azureADAuthenticationAsArmPolicy\":{\"status\":\"disabled\"}}") + .toObject(Policies.class); + Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); + Assertions.assertEquals(1951867342, model.retentionPolicy().days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + model.azureADAuthenticationAsArmPolicy().status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Policies model = new Policies().withQuarantinePolicy(new QuarantinePolicy().withStatus(PolicyStatus.DISABLED)) + .withTrustPolicy(new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.ENABLED)) + .withRetentionPolicy(new RetentionPolicy().withDays(1951867342).withStatus(PolicyStatus.ENABLED)) + .withExportPolicy(new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED)) + .withAzureADAuthenticationAsArmPolicy( + new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(Policies.class); + Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.trustPolicy().type()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.trustPolicy().status()); + Assertions.assertEquals(1951867342, model.retentionPolicy().days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); + Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + model.azureADAuthenticationAsArmPolicy().status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..a4f32f3ba1f3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionInnerTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerregistry.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.models.PrivateEndpoint; +import com.azure.resourcemanager.containerregistry.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"ouqfprwz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"itnwuizgazxufi\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"},\"id\":\"i\",\"name\":\"rfidfvzwdz\",\"type\":\"htymw\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals("ouqfprwz", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("itnwuizgazxufi", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("ouqfprwz")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("itnwuizgazxufi") + .withActionsRequired(ActionsRequired.NONE)); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals("ouqfprwz", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("itnwuizgazxufi", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java new file mode 100644 index 000000000000..4dc8ed4517c1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerregistry.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.models.ConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qnermclfplphoxu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bgyepsbj\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"xywpmueefjzwfqkq\",\"name\":\"jidsuyonobglaoc\",\"type\":\"xtccmg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ytlmoyrxvwfud\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"xhdzhlrqjbhckf\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"bkyvp\",\"name\":\"ca\",\"type\":\"uzbpzkafku\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"nwbmeh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jusrtslhspk\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Creating\"},\"id\":\"fm\",\"name\":\"ag\",\"type\":\"vt\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"qkrhahvljua\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"c\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"laexqp\",\"name\":\"fadmws\",\"type\":\"crgvxpvgom\"}],\"nextLink\":\"fmisg\"}") + .toObject(PrivateEndpointConnectionListResult.class); + Assertions.assertEquals("qnermclfplphoxu", model.value().get(0).privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.PENDING, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bgyepsbj", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, + model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("fmisg", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..67794b005177 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.containerregistry.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.models.PrivateEndpoint; +import com.azure.resourcemanager.containerregistry.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"privateEndpoint\":{\"id\":\"kfthwxmntei\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"km\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Creating\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("kfthwxmntei")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) + .withDescription("km") + .withActionsRequired(ActionsRequired.NONE)); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals("kfthwxmntei", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("km", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..bea13a811b75 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PrivateEndpoint; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"dcuf\"}").toObject(PrivateEndpoint.class); + Assertions.assertEquals("dcuf", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint().withId("dcuf"); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + Assertions.assertEquals("dcuf", model.id()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..e9a6dac52a58 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.PrivateLinkResourceInner; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"okth\",\"requiredMembers\":[\"uaodsfcpk\",\"xodpuozmyzydagfu\"],\"requiredZoneNames\":[\"ezyiuokktwhrdxw\"]},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("ezyiuokktwhrdxw", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java new file mode 100644 index 000000000000..afadfd6fa83e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.PrivateLinkResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"pxjmflbvvnchr\",\"requiredMembers\":[\"iwwzjuqk\",\"rsa\",\"iwkuofos\"],\"requiredZoneNames\":[\"sauuimj\",\"vxieduugidyj\",\"rfbyaosvexcso\",\"pclhocohslk\"]},\"id\":\"leggzfbu\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"igrxwburvjxxjn\",\"requiredMembers\":[\"dptkoenkouk\",\"vudwtiukbldng\"],\"requiredZoneNames\":[\"cipazyxoegukgjnp\",\"ucgygevqz\",\"typmrbpizcdrqjsd\"]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"},{\"properties\":{\"groupId\":\"eyeam\",\"requiredMembers\":[\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"requiredZoneNames\":[\"uttmrywnuzoqft\"]},\"id\":\"qzrnkcqvyxlwhz\",\"name\":\"sicohoqqnwvlry\",\"type\":\"vwhheunmmqhgyx\"},{\"properties\":{\"groupId\":\"noc\",\"requiredMembers\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"],\"requiredZoneNames\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]},\"id\":\"ihkaetcktvfc\",\"name\":\"vf\",\"type\":\"nkymuctqhjfbebrj\"}],\"nextLink\":\"erfuwuttt\"}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("sauuimj", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("erfuwuttt", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..b96b0ff27eb0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.PrivateLinkResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"tki\",\"requiredMembers\":[\"hqyudxorrqnbpoc\",\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"requiredZoneNames\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("exxbczwtr", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..fdf302cb4485 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ActionsRequired; +import com.azure.resourcemanager.containerregistry.models.ConnectionStatus; +import com.azure.resourcemanager.containerregistry.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model = BinaryData + .fromString("{\"status\":\"Approved\",\"description\":\"pymzidnsezcxtbzs\",\"actionsRequired\":\"None\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); + Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("pymzidnsezcxtbzs") + .withActionsRequired(ActionsRequired.NONE); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); + Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/QuarantinePolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/QuarantinePolicyTests.java new file mode 100644 index 000000000000..30d735b37793 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/QuarantinePolicyTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.models.QuarantinePolicy; +import org.junit.jupiter.api.Assertions; + +public final class QuarantinePolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuarantinePolicy model = BinaryData.fromString("{\"status\":\"enabled\"}").toObject(QuarantinePolicy.class); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuarantinePolicy model = new QuarantinePolicy().withStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(QuarantinePolicy.class); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegenerateCredentialParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegenerateCredentialParametersTests.java new file mode 100644 index 000000000000..c39a4f6f273a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegenerateCredentialParametersTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PasswordName; +import com.azure.resourcemanager.containerregistry.models.RegenerateCredentialParameters; +import org.junit.jupiter.api.Assertions; + +public final class RegenerateCredentialParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegenerateCredentialParameters model + = BinaryData.fromString("{\"name\":\"password2\"}").toObject(RegenerateCredentialParameters.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegenerateCredentialParameters model = new RegenerateCredentialParameters().withName(PasswordName.PASSWORD2); + model = BinaryData.fromObject(model).toObject(RegenerateCredentialParameters.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java new file mode 100644 index 000000000000..082110fd6e0d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ContainerRegistryResourceType; +import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; +import org.junit.jupiter.api.Assertions; + +public final class RegistryNameCheckRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryNameCheckRequest model + = BinaryData.fromString("{\"name\":\"mdajv\",\"type\":\"Microsoft.ContainerRegistry/registries\"}") + .toObject(RegistryNameCheckRequest.class); + Assertions.assertEquals("mdajv", model.name()); + Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES); + model = BinaryData.fromObject(model).toObject(RegistryNameCheckRequest.class); + Assertions.assertEquals("mdajv", model.name()); + Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java new file mode 100644 index 000000000000..0f90c4879c6e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.RegistryNameStatusInner; +import org.junit.jupiter.api.Assertions; + +public final class RegistryNameStatusInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryNameStatusInner model + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"nqecanoaeup\",\"message\":\"yhltrpmopjmcm\"}") + .toObject(RegistryNameStatusInner.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals("nqecanoaeup", model.reason()); + Assertions.assertEquals("yhltrpmopjmcm", model.message()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryPasswordTests.java new file mode 100644 index 000000000000..a5300dbe3e1c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryPasswordTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PasswordName; +import com.azure.resourcemanager.containerregistry.models.RegistryPassword; +import org.junit.jupiter.api.Assertions; + +public final class RegistryPasswordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryPassword model = BinaryData.fromString("{\"name\":\"password2\",\"value\":\"bqvudwxdndn\"}") + .toObject(RegistryPassword.class); + Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); + Assertions.assertEquals("bqvudwxdndn", model.value()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageListResultInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageListResultInnerTests.java new file mode 100644 index 000000000000..a32b53d7ae4f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageListResultInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner; +import com.azure.resourcemanager.containerregistry.models.RegistryUsageUnit; +import org.junit.jupiter.api.Assertions; + +public final class RegistryUsageListResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryUsageListResultInner model = BinaryData.fromString( + "{\"value\":[{\"name\":\"bonqvpkvlrxnjeas\",\"limit\":2687249492266688034,\"currentValue\":8008413633793129277,\"unit\":\"Bytes\"},{\"name\":\"eyy\",\"limit\":1523460255580500378,\"currentValue\":1246859219124083387,\"unit\":\"Bytes\"},{\"name\":\"rhpdjpjumas\",\"limit\":1164635978047948118,\"currentValue\":4118233747929526801,\"unit\":\"Count\"}]}") + .toObject(RegistryUsageListResultInner.class); + Assertions.assertEquals("bonqvpkvlrxnjeas", model.value().get(0).name()); + Assertions.assertEquals(2687249492266688034L, model.value().get(0).limit()); + Assertions.assertEquals(8008413633793129277L, model.value().get(0).currentValue()); + Assertions.assertEquals(RegistryUsageUnit.BYTES, model.value().get(0).unit()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageTests.java new file mode 100644 index 000000000000..4bb3ba605df3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryUsageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.RegistryUsage; +import com.azure.resourcemanager.containerregistry.models.RegistryUsageUnit; +import org.junit.jupiter.api.Assertions; + +public final class RegistryUsageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistryUsage model = BinaryData.fromString( + "{\"name\":\"alhbx\",\"limit\":65515238204620048,\"currentValue\":2136882508954141287,\"unit\":\"Bytes\"}") + .toObject(RegistryUsage.class); + Assertions.assertEquals("alhbx", model.name()); + Assertions.assertEquals(65515238204620048L, model.limit()); + Assertions.assertEquals(2136882508954141287L, model.currentValue()); + Assertions.assertEquals(RegistryUsageUnit.BYTES, model.unit()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java new file mode 100644 index 000000000000..ae998b1e5531 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ReplicationInner; +import com.azure.resourcemanager.containerregistry.models.ZoneRedundancy; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"ldawkzbaliourqha\",\"message\":\"uhashsfwx\",\"timestamp\":\"2021-10-19T13:09:56Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"gicjooxdjeb\",\"tags\":{\"ecivyh\":\"cwwfvovbvme\"},\"id\":\"ce\",\"name\":\"ojgjrwjueiotwmc\",\"type\":\"ytdxwit\"}") + .toObject(ReplicationInner.class); + Assertions.assertEquals("gicjooxdjeb", model.location()); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); + Assertions.assertFalse(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationInner model = new ReplicationInner().withLocation("gicjooxdjeb") + .withTags(mapOf("ecivyh", "cwwfvovbvme")) + .withRegionEndpointEnabled(false) + .withZoneRedundancy(ZoneRedundancy.DISABLED); + model = BinaryData.fromObject(model).toObject(ReplicationInner.class); + Assertions.assertEquals("gicjooxdjeb", model.location()); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); + Assertions.assertFalse(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java new file mode 100644 index 000000000000..d643f515e220 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.ReplicationListResult; +import com.azure.resourcemanager.containerregistry.models.ZoneRedundancy; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":{\"displayStatus\":\"przqlveu\",\"message\":\"upjm\",\"timestamp\":\"2021-08-12T08:43:21Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"sw\",\"tags\":{\"blcg\":\"jriplrbpbewtghf\",\"nmxiebwwaloayqc\":\"xzvlvqhjkbegib\"},\"id\":\"wrtz\",\"name\":\"uzgwyzmhtx\",\"type\":\"ngmtsavjcb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":{\"displayStatus\":\"rknftguvriuhprwm\",\"message\":\"vxqtayriwwroyqbe\",\"timestamp\":\"2021-06-25T11:51:15Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"cnojvknmefqsg\",\"tags\":{\"j\":\"hapjyzhpvgqz\"},\"id\":\"vxdjzlmwlxkvugf\",\"name\":\"zovawjvz\",\"type\":\"nluthnnp\"}],\"nextLink\":\"xipeilpjzuaejx\"}") + .toObject(ReplicationListResult.class); + Assertions.assertEquals("sw", model.value().get(0).location()); + Assertions.assertEquals("jriplrbpbewtghf", model.value().get(0).tags().get("blcg")); + Assertions.assertFalse(model.value().get(0).regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.value().get(0).zoneRedundancy()); + Assertions.assertEquals("xipeilpjzuaejx", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java new file mode 100644 index 000000000000..401daacd0385 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ReplicationProperties; +import com.azure.resourcemanager.containerregistry.models.ZoneRedundancy; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"wgqwgxhn\",\"message\":\"kxfbkpycgklwndn\",\"timestamp\":\"2021-06-18T07:43:59Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"}") + .toObject(ReplicationProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationProperties model + = new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED); + model = BinaryData.fromObject(model).toObject(ReplicationProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java new file mode 100644 index 000000000000..d5da462e40a1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ReplicationUpdateParametersProperties; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationUpdateParametersPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationUpdateParametersProperties model = BinaryData.fromString("{\"regionEndpointEnabled\":true}") + .toObject(ReplicationUpdateParametersProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationUpdateParametersProperties model + = new ReplicationUpdateParametersProperties().withRegionEndpointEnabled(true); + model = BinaryData.fromObject(model).toObject(ReplicationUpdateParametersProperties.class); + Assertions.assertTrue(model.regionEndpointEnabled()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java new file mode 100644 index 000000000000..19e1748bbea8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ReplicationUpdateParameters; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ReplicationUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReplicationUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"zbtd\":\"l\"},\"properties\":{\"regionEndpointEnabled\":false}}") + .toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("l", model.tags().get("zbtd")); + Assertions.assertFalse(model.regionEndpointEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReplicationUpdateParameters model + = new ReplicationUpdateParameters().withTags(mapOf("zbtd", "l")).withRegionEndpointEnabled(false); + model = BinaryData.fromObject(model).toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("l", model.tags().get("zbtd")); + Assertions.assertFalse(model.regionEndpointEnabled()); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java new file mode 100644 index 000000000000..da1c4e09b13d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Request; +import org.junit.jupiter.api.Assertions; + +public final class RequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Request model = BinaryData.fromString( + "{\"id\":\"vbbejdcng\",\"addr\":\"m\",\"host\":\"kufgmj\",\"method\":\"wr\",\"useragent\":\"rtwaenuuzko\"}") + .toObject(Request.class); + Assertions.assertEquals("vbbejdcng", model.id()); + Assertions.assertEquals("m", model.addr()); + Assertions.assertEquals("kufgmj", model.host()); + Assertions.assertEquals("wr", model.method()); + Assertions.assertEquals("rtwaenuuzko", model.useragent()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RetentionPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RetentionPolicyTests.java new file mode 100644 index 000000000000..ab6705bd6eb9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RetentionPolicyTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.models.RetentionPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RetentionPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RetentionPolicy model = BinaryData + .fromString("{\"days\":1398747720,\"lastUpdatedTime\":\"2021-04-29T02:40:58Z\",\"status\":\"enabled\"}") + .toObject(RetentionPolicy.class); + Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RetentionPolicy model = new RetentionPolicy().withDays(1398747720).withStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(RetentionPolicy.class); + Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java new file mode 100644 index 000000000000..9ca2410c2c63 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ScopeMapInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapInner model = BinaryData.fromString( + "{\"properties\":{\"description\":\"tskzbbtdzumveek\",\"type\":\"wozuhkf\",\"creationDate\":\"2021-11-15T23:25:51Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"f\"]},\"id\":\"luu\",\"name\":\"dttouwaboekqvkel\",\"type\":\"smv\"}") + .toObject(ScopeMapInner.class); + Assertions.assertEquals("tskzbbtdzumveek", model.description()); + Assertions.assertEquals("f", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapInner model = new ScopeMapInner().withDescription("tskzbbtdzumveek").withActions(Arrays.asList("f")); + model = BinaryData.fromObject(model).toObject(ScopeMapInner.class); + Assertions.assertEquals("tskzbbtdzumveek", model.description()); + Assertions.assertEquals("f", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java new file mode 100644 index 000000000000..aa80fccb6701 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.ScopeMapListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"description\":\"tfdygpfqb\",\"type\":\"ceopzfqrhhuaopp\",\"creationDate\":\"2021-12-04T10:32:02Z\",\"provisioningState\":\"Failed\",\"actions\":[\"ol\",\"dahzxctobg\",\"kdmoi\"]},\"id\":\"ostmgrcf\",\"name\":\"unrmfqjhhkxb\",\"type\":\"vjymjhxxjyngud\"},{\"properties\":{\"description\":\"r\",\"type\":\"wbxqzvszjfau\",\"creationDate\":\"2021-09-23T21:18:01Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"ivetvtcq\",\"qtdo\"]},\"id\":\"cbxvwvxyslqbh\",\"name\":\"fxoblytkb\",\"type\":\"mpew\"}],\"nextLink\":\"fbkrvrnsvs\"}") + .toObject(ScopeMapListResult.class); + Assertions.assertEquals("tfdygpfqb", model.value().get(0).description()); + Assertions.assertEquals("ol", model.value().get(0).actions().get(0)); + Assertions.assertEquals("fbkrvrnsvs", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java new file mode 100644 index 000000000000..5b988818280b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ScopeMapProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapProperties model = BinaryData.fromString( + "{\"description\":\"wyjsflhhcaalnjix\",\"type\":\"xyawj\",\"creationDate\":\"2021-08-07T05:01:18Z\",\"provisioningState\":\"Failed\",\"actions\":[\"lyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"]}") + .toObject(ScopeMapProperties.class); + Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); + Assertions.assertEquals("lyjpk", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapProperties model = new ScopeMapProperties().withDescription("wyjsflhhcaalnjix") + .withActions(Arrays.asList("lyjpk", "idzyexznelixhnr", "tfolhbnx")); + model = BinaryData.fromObject(model).toObject(ScopeMapProperties.class); + Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); + Assertions.assertEquals("lyjpk", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java new file mode 100644 index 000000000000..c6f719bdebde --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ScopeMapPropertiesUpdateParameters; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapPropertiesUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapPropertiesUpdateParameters model + = BinaryData.fromString("{\"description\":\"hxg\",\"actions\":[\"mgucna\",\"kteo\"]}") + .toObject(ScopeMapPropertiesUpdateParameters.class); + Assertions.assertEquals("hxg", model.description()); + Assertions.assertEquals("mgucna", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapPropertiesUpdateParameters model = new ScopeMapPropertiesUpdateParameters().withDescription("hxg") + .withActions(Arrays.asList("mgucna", "kteo")); + model = BinaryData.fromObject(model).toObject(ScopeMapPropertiesUpdateParameters.class); + Assertions.assertEquals("hxg", model.description()); + Assertions.assertEquals("mgucna", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java new file mode 100644 index 000000000000..2039e15174d7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.ScopeMapUpdateParameters; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopeMapUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopeMapUpdateParameters model = BinaryData.fromString( + "{\"properties\":{\"description\":\"laulppg\",\"actions\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"]}}") + .toObject(ScopeMapUpdateParameters.class); + Assertions.assertEquals("laulppg", model.description()); + Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("laulppg") + .withActions(Arrays.asList("pnapnyiropuh", "igvpgylg", "git", "medjvcslynqwwncw")); + model = BinaryData.fromObject(model).toObject(ScopeMapUpdateParameters.class); + Assertions.assertEquals("laulppg", model.description()); + Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SkuTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SkuTests.java new file mode 100644 index 000000000000..8b5947e8d2de --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SkuTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Sku; +import com.azure.resourcemanager.containerregistry.models.SkuName; +import org.junit.jupiter.api.Assertions; + +public final class SkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Sku model = BinaryData.fromString("{\"name\":\"Classic\",\"tier\":\"Classic\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.CLASSIC, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Sku model = new Sku().withName(SkuName.CLASSIC); + model = BinaryData.fromObject(model).toObject(Sku.class); + Assertions.assertEquals(SkuName.CLASSIC, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java new file mode 100644 index 000000000000..a9dadf727ac4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Source; +import org.junit.jupiter.api.Assertions; + +public final class SourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Source model + = BinaryData.fromString("{\"addr\":\"uhhziuiefozbhdm\",\"instanceID\":\"l\"}").toObject(Source.class); + Assertions.assertEquals("uhhziuiefozbhdm", model.addr()); + Assertions.assertEquals("l", model.instanceID()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/StatusTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/StatusTests.java new file mode 100644 index 000000000000..e0971c61d6d8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/StatusTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Status; + +public final class StatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Status model = BinaryData.fromString( + "{\"displayStatus\":\"svqwhbmdgbbjfd\",\"message\":\"mbmbexppbh\",\"timestamp\":\"2021-09-17T16:41:16Z\"}") + .toObject(Status.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java new file mode 100644 index 000000000000..98055c8331cf --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.SyncUpdateProperties; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class SyncUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SyncUpdateProperties model = BinaryData + .fromString( + "{\"schedule\":\"svlxotogtwrup\",\"syncWindow\":\"PT119H24M20S\",\"messageTtl\":\"PT72H58M15S\"}") + .toObject(SyncUpdateProperties.class); + Assertions.assertEquals("svlxotogtwrup", model.schedule()); + Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("svlxotogtwrup") + .withSyncWindow(Duration.parse("PT119H24M20S")) + .withMessageTtl(Duration.parse("PT72H58M15S")); + model = BinaryData.fromObject(model).toObject(SyncUpdateProperties.class); + Assertions.assertEquals("svlxotogtwrup", model.schedule()); + Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java new file mode 100644 index 000000000000..d96d1c723285 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.Target; +import org.junit.jupiter.api.Assertions; + +public final class TargetTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Target model = BinaryData.fromString( + "{\"mediaType\":\"tlmngu\",\"size\":8390359388948965260,\"digest\":\"ldsyuuximerqfob\",\"length\":8923665884777818679,\"repository\":\"bykutw\",\"url\":\"hpagm\",\"tag\":\"skdsnfdsdoakg\",\"name\":\"lmkk\",\"version\":\"vdlhewpusdsttwv\"}") + .toObject(Target.class); + Assertions.assertEquals("tlmngu", model.mediaType()); + Assertions.assertEquals(8390359388948965260L, model.size()); + Assertions.assertEquals("ldsyuuximerqfob", model.digest()); + Assertions.assertEquals(8923665884777818679L, model.length()); + Assertions.assertEquals("bykutw", model.repository()); + Assertions.assertEquals("hpagm", model.url()); + Assertions.assertEquals("skdsnfdsdoakg", model.tag()); + Assertions.assertEquals("lmkk", model.name()); + Assertions.assertEquals("vdlhewpusdsttwv", model.version()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java new file mode 100644 index 000000000000..b27a8b59bdea --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.TlsCertificateProperties; + +public final class TlsCertificatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TlsCertificateProperties model = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"b\"}") + .toObject(TlsCertificateProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java new file mode 100644 index 000000000000..a39957ac7ce4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.TlsProperties; + +public final class TlsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TlsProperties model = BinaryData + .fromString( + "{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"gnxytxhpzxbz\"}}") + .toObject(TlsProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TokenPasswordTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TokenPasswordTests.java new file mode 100644 index 000000000000..95c7c7ad438d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TokenPasswordTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.TokenPassword; +import com.azure.resourcemanager.containerregistry.models.TokenPasswordName; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class TokenPasswordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TokenPassword model = BinaryData.fromString( + "{\"creationTime\":\"2021-01-13T20:24:26Z\",\"expiry\":\"2021-06-09T11:05:27Z\",\"name\":\"password2\",\"value\":\"tpngjcrcczsqpjh\"}") + .toObject(TokenPassword.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TokenPassword model = new TokenPassword().withCreationTime(OffsetDateTime.parse("2021-01-13T20:24:26Z")) + .withExpiry(OffsetDateTime.parse("2021-06-09T11:05:27Z")) + .withName(TokenPasswordName.PASSWORD2); + model = BinaryData.fromObject(model).toObject(TokenPassword.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T20:24:26Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T11:05:27Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD2, model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TrustPolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TrustPolicyTests.java new file mode 100644 index 000000000000..26411220f210 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TrustPolicyTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PolicyStatus; +import com.azure.resourcemanager.containerregistry.models.TrustPolicy; +import com.azure.resourcemanager.containerregistry.models.TrustPolicyType; +import org.junit.jupiter.api.Assertions; + +public final class TrustPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TrustPolicy model + = BinaryData.fromString("{\"type\":\"Notary\",\"status\":\"disabled\"}").toObject(TrustPolicy.class); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TrustPolicy model = new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.DISABLED); + model = BinaryData.fromObject(model).toObject(TrustPolicy.class); + Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/UserIdentityPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/UserIdentityPropertiesTests.java new file mode 100644 index 000000000000..849c4ef33d62 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/UserIdentityPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.UserIdentityProperties; + +public final class UserIdentityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserIdentityProperties model + = BinaryData.fromString("{\"principalId\":\"norcjxvsnbyxqab\",\"clientId\":\"ocpcy\"}") + .toObject(UserIdentityProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserIdentityProperties model = new UserIdentityProperties(); + model = BinaryData.fromObject(model).toObject(UserIdentityProperties.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java new file mode 100644 index 000000000000..260d2dae1119 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookCreateParameters; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookCreateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookCreateParameters model = BinaryData.fromString( + "{\"tags\":{\"bpodxunkbebxm\":\"kzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\",\"xe\":\"p\"},\"location\":\"mnzb\",\"properties\":{\"serviceUri\":\"hjpglkf\",\"customHeaders\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"status\":\"enabled\",\"scope\":\"cffgdkzzewk\",\"actions\":[\"push\",\"quarantine\"]}}") + .toObject(WebhookCreateParameters.class); + Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); + Assertions.assertEquals("mnzb", model.location()); + Assertions.assertEquals("hjpglkf", model.serviceUri()); + Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("cffgdkzzewk", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookCreateParameters model = new WebhookCreateParameters() + .withTags(mapOf("bpodxunkbebxm", "kzgxhurip", "oievseotgqrlltm", "byyntwlrbqt", "jefuzmuvpbttdumo", + "wlauwzizxbmpg", "xe", "p")) + .withLocation("mnzb") + .withServiceUri("hjpglkf") + .withCustomHeaders(mapOf("lfphsdyhtozfikd", "dneu", "zonosgg", "wwquuvxzxclvithh", "ljuti", "hcohfwdsjnk")) + .withStatus(WebhookStatus.ENABLED) + .withScope("cffgdkzzewk") + .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.QUARANTINE)); + model = BinaryData.fromObject(model).toObject(WebhookCreateParameters.class); + Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); + Assertions.assertEquals("mnzb", model.location()); + Assertions.assertEquals("hjpglkf", model.serviceUri()); + Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("cffgdkzzewk", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java new file mode 100644 index 000000000000..a122fd3b24be --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.WebhookInner; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookInner model = BinaryData.fromString( + "{\"properties\":{\"status\":\"disabled\",\"scope\":\"fznudaodvxzb\",\"actions\":[\"chart_push\",\"delete\",\"chart_push\",\"push\"],\"provisioningState\":\"Canceled\"},\"location\":\"dbh\",\"tags\":{\"evfiwjmygt\":\"rzdzucerscdnt\",\"pyqs\":\"sslswtmweriof\",\"vwiwubmwmbesld\":\"mwabnetshhszhedp\",\"wtppjflcxogaoko\":\"k\"},\"id\":\"z\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}") + .toObject(WebhookInner.class); + Assertions.assertEquals("dbh", model.location()); + Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("fznudaodvxzb", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookInner model = new WebhookInner().withLocation("dbh") + .withTags(mapOf("evfiwjmygt", "rzdzucerscdnt", "pyqs", "sslswtmweriof", "vwiwubmwmbesld", + "mwabnetshhszhedp", "wtppjflcxogaoko", "k")) + .withStatus(WebhookStatus.DISABLED) + .withScope("fznudaodvxzb") + .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.DELETE, WebhookAction.CHART_PUSH, + WebhookAction.PUSH)); + model = BinaryData.fromObject(model).toObject(WebhookInner.class); + Assertions.assertEquals("dbh", model.location()); + Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("fznudaodvxzb", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java new file mode 100644 index 000000000000..933d8c6bcb94 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.implementation.models.WebhookListResult; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import org.junit.jupiter.api.Assertions; + +public final class WebhookListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"status\":\"disabled\",\"scope\":\"rjxgciqib\",\"actions\":[\"push\"],\"provisioningState\":\"Failed\"},\"location\":\"dqrhzoymib\",\"tags\":{\"wfluszdt\":\"yiba\"},\"id\":\"hrkwo\",\"name\":\"yyv\",\"type\":\"qacpiex\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"wbwo\",\"actions\":[\"push\",\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"tdtkcn\",\"tags\":{\"i\":\"bpokulpiujwaasip\",\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\",\"h\":\"koymkcd\"},\"id\":\"pkkpw\",\"name\":\"reqnovvqfov\",\"type\":\"jxywsuws\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"sytgadgvraea\",\"actions\":[\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"arrwlquu\",\"tags\":{\"fpubjibwwi\":\"qkacewii\"},\"id\":\"tohqkvpuvksgp\",\"name\":\"saknynfsyn\",\"type\":\"jphuopxodlqi\"}],\"nextLink\":\"torzih\"}") + .toObject(WebhookListResult.class); + Assertions.assertEquals("dqrhzoymib", model.value().get(0).location()); + Assertions.assertEquals("yiba", model.value().get(0).tags().get("wfluszdt")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.value().get(0).status()); + Assertions.assertEquals("rjxgciqib", model.value().get(0).scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.value().get(0).actions().get(0)); + Assertions.assertEquals("torzih", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java new file mode 100644 index 000000000000..6ae865d09ad9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.WebhookPropertiesCreateParameters; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesCreateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookPropertiesCreateParameters model = BinaryData.fromString( + "{\"serviceUri\":\"crailvpn\",\"customHeaders\":{\"hdlxyjrxsagafcn\":\"uflrwd\",\"apnedgfbcvkc\":\"hgw\",\"pkeqdcvdrhvoo\":\"q\"},\"status\":\"disabled\",\"scope\":\"bobzdopcjwvnhd\",\"actions\":[\"chart_delete\"]}") + .toObject(WebhookPropertiesCreateParameters.class); + Assertions.assertEquals("crailvpn", model.serviceUri()); + Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("crailvpn") + .withCustomHeaders(mapOf("hdlxyjrxsagafcn", "uflrwd", "apnedgfbcvkc", "hgw", "pkeqdcvdrhvoo", "q")) + .withStatus(WebhookStatus.DISABLED) + .withScope("bobzdopcjwvnhd") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE)); + model = BinaryData.fromObject(model).toObject(WebhookPropertiesCreateParameters.class); + Assertions.assertEquals("crailvpn", model.serviceUri()); + Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java new file mode 100644 index 000000000000..8c9bd3ab0741 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.WebhookProperties; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookProperties model = BinaryData.fromString( + "{\"status\":\"disabled\",\"scope\":\"gxtibqdxbxw\",\"actions\":[\"delete\",\"chart_delete\",\"delete\",\"delete\"],\"provisioningState\":\"Canceled\"}") + .toObject(WebhookProperties.class); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("gxtibqdxbxw", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookProperties model = new WebhookProperties().withStatus(WebhookStatus.DISABLED) + .withScope("gxtibqdxbxw") + .withActions(Arrays.asList(WebhookAction.DELETE, WebhookAction.CHART_DELETE, WebhookAction.DELETE, + WebhookAction.DELETE)); + model = BinaryData.fromObject(model).toObject(WebhookProperties.class); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("gxtibqdxbxw", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java new file mode 100644 index 000000000000..081dded2d80b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.WebhookPropertiesUpdateParameters; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookPropertiesUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookPropertiesUpdateParameters model = BinaryData.fromString( + "{\"serviceUri\":\"iyzvqtmnub\",\"customHeaders\":{\"mond\":\"pzk\",\"gkopkwhojvpajqgx\":\"mquxvypo\",\"qvmkcxo\":\"smocmbq\"},\"status\":\"disabled\",\"scope\":\"helxprglya\",\"actions\":[\"chart_push\",\"push\"]}") + .toObject(WebhookPropertiesUpdateParameters.class); + Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); + Assertions.assertEquals("pzk", model.customHeaders().get("mond")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("helxprglya", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("iyzvqtmnub") + .withCustomHeaders(mapOf("mond", "pzk", "gkopkwhojvpajqgx", "mquxvypo", "qvmkcxo", "smocmbq")) + .withStatus(WebhookStatus.DISABLED) + .withScope("helxprglya") + .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH)); + model = BinaryData.fromObject(model).toObject(WebhookPropertiesUpdateParameters.class); + Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); + Assertions.assertEquals("pzk", model.customHeaders().get("mond")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("helxprglya", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java new file mode 100644 index 000000000000..e8ee5aa041b1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; +import com.azure.resourcemanager.containerregistry.models.WebhookStatus; +import com.azure.resourcemanager.containerregistry.models.WebhookUpdateParameters; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WebhookUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WebhookUpdateParameters model = BinaryData.fromString( + "{\"tags\":{\"mutwuoe\":\"xcxrsl\"},\"properties\":{\"serviceUri\":\"khjwn\",\"customHeaders\":{\"vmbmp\":\"sluicpdggkzz\",\"uefywsbpfvmwy\":\"xmodf\"},\"status\":\"enabled\",\"scope\":\"uyfta\",\"actions\":[\"quarantine\"]}}") + .toObject(WebhookUpdateParameters.class); + Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); + Assertions.assertEquals("khjwn", model.serviceUri()); + Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("uyfta", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WebhookUpdateParameters model = new WebhookUpdateParameters().withTags(mapOf("mutwuoe", "xcxrsl")) + .withServiceUri("khjwn") + .withCustomHeaders(mapOf("vmbmp", "sluicpdggkzz", "uefywsbpfvmwy", "xmodf")) + .withStatus(WebhookStatus.ENABLED) + .withScope("uyfta") + .withActions(Arrays.asList(WebhookAction.QUARANTINE)); + model = BinaryData.fromObject(model).toObject(WebhookUpdateParameters.class); + Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); + Assertions.assertEquals("khjwn", model.serviceUri()); + Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("uyfta", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + } + + // Use "Map.of" if available + @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/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml new file mode 100644 index 000000000000..e515baa53e83 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry +commit: 926d47e176855de8c16d39bde587afe25cb1f20d +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 11fa91923585..9dcc2944b830 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -152,7 +152,7 @@ com.azure.resourcemanager azure-resourcemanager-containerregistry - 2.54.1 + 2.55.0 com.azure.resourcemanager diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java index 7f30670c7373..5a137044b8cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -11,9 +11,7 @@ */ public final class CacheRulesCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CacheRuleCreate.json + * x-ms-original-file: 2025-11-01/CacheRuleCreate.json */ /** * Sample code: CacheRuleCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java index 38fef1183eb2..24fff4434181 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CacheRulesDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CacheRuleDelete.json + * x-ms-original-file: 2025-11-01/CacheRuleDelete.json */ /** * Sample code: CacheRuleDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java index 7e7b30be8ded..3d174bd0f72e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CacheRulesGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CacheRuleGet.json + * x-ms-original-file: 2025-11-01/CacheRuleGet.json */ /** * Sample code: CacheRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java index 7cd7c7375fc7..d10b2b5e7729 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CacheRulesListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CacheRuleList.json + * x-ms-original-file: 2025-11-01/CacheRuleList.json */ /** * Sample code: CacheRuleList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java index 4efebf042710..da60cf5bd6d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -11,9 +11,7 @@ */ public final class CacheRulesUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CacheRuleUpdate.json + * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json */ /** * Sample code: CacheRuleUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesCreateSamples.java index e624f822a557..82b6da8e20c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -17,9 +17,7 @@ */ public final class ConnectedRegistriesCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryCreate.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json */ /** * Sample code: ConnectedRegistryCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeactivateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeactivateSamples.java index c62a77100d5f..415e5280ec21 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeactivateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeactivateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ConnectedRegistriesDeactivateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryDeactivate.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json */ /** * Sample code: ConnectedRegistryDeactivate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeleteSamples.java index db6493677f7f..8d432bb53320 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ConnectedRegistriesDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryDelete.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json */ /** * Sample code: ConnectedRegistryDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesGetSamples.java index a451428e2088..429958408059 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ConnectedRegistriesGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryGet.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json */ /** * Sample code: ConnectedRegistryGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesListSamples.java index 4196cd613fad..6d9fef77fbed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ConnectedRegistriesListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryList.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json */ /** * Sample code: ConnectedRegistryList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesUpdateSamples.java index 2408649e7e42..0f27dcf0f08d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -18,9 +18,7 @@ */ public final class ConnectedRegistriesUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ConnectedRegistryUpdate.json + * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json */ /** * Sample code: ConnectedRegistryUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java index db50344527fd..de0931e7a86f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -16,9 +16,7 @@ */ public final class CredentialSetsCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CredentialSetCreate.json + * x-ms-original-file: 2025-11-01/CredentialSetCreate.json */ /** * Sample code: CredentialSetCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java index 9278218e18de..0915e4433489 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CredentialSetsDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CredentialSetDelete.json + * x-ms-original-file: 2025-11-01/CredentialSetDelete.json */ /** * Sample code: CredentialSetDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java index 53f70268f173..053d34c8bf5d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CredentialSetsGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CredentialSetGet.json + * x-ms-original-file: 2025-11-01/CredentialSetGet.json */ /** * Sample code: CredentialSetGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java index d07218bc88d5..2603e0dea8d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class CredentialSetsListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CredentialSetList.json + * x-ms-original-file: 2025-11-01/CredentialSetList.json */ /** * Sample code: CredentialSetList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java index 3c979423241d..0d107742f249 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -14,9 +14,7 @@ */ public final class CredentialSetsUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * CredentialSetUpdate.json + * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json */ /** * Sample code: CredentialSetUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java index 9ccb6bafd466..d92cfdfed79e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * OperationList.json + * x-ms-original-file: 2025-11-01/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 4a0a1dcf0f61..8030885875f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -13,9 +13,7 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * PrivateEndpointConnectionCreateOrUpdate.json + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json */ /** * Sample code: PrivateEndpointConnectionCreateOrUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java index 9d7b5d114f9f..247498a86c16 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * PrivateEndpointConnectionDelete.json + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java index 13283a933909..ddb83529f7b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json */ /** * Sample code: PrivateEndpointConnectionGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java index cde02b65c8c1..2be694130883 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * PrivateEndpointConnectionList.json + * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json */ /** * Sample code: PrivateEndpointConnectionList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java index dae07cb2c541..f57f0f02b156 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; +import com.azure.resourcemanager.containerregistry.models.ContainerRegistryResourceType; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; /** @@ -11,9 +12,7 @@ */ public final class RegistriesCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryCheckNameAvailable.json + * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json */ /** * Sample code: RegistryCheckNameAvailable. @@ -25,14 +24,14 @@ public static void registryCheckNameAvailable(com.azure.resourcemanager.AzureRes .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryCheckNameNotAvailable.json + * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json */ /** * Sample code: RegistryCheckNameNotAvailable. @@ -44,7 +43,9 @@ public static void registryCheckNameNotAvailable(com.azure.resourcemanager.Azure .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java index 73e9e5d75ed0..5e21cff6d206 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -17,9 +17,7 @@ */ public final class RegistriesCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryCreateAbac.json + * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json */ /** * Sample code: RegistryCreateAbac. @@ -40,9 +38,7 @@ public static void registryCreateAbac(com.azure.resourcemanager.AzureResourceMan } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryCreateZoneRedundant.json + * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json */ /** * Sample code: RegistryCreateZoneRedundant. @@ -63,9 +59,7 @@ public static void registryCreateZoneRedundant(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryCreate.json + * x-ms-original-file: 2025-11-01/RegistryCreate.json */ /** * Sample code: RegistryCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java index e95d1fb02372..7d4a24062077 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryDelete.json + * x-ms-original-file: 2025-11-01/RegistryDelete.json */ /** * Sample code: RegistryDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java index a9a45907b144..4abda7cd4579 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -12,9 +12,7 @@ */ public final class RegistriesGenerateCredentialsSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryGenerateCredentials.json + * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json */ /** * Sample code: RegistryGenerateCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java index e676d66c1ef1..8997feddfad4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryGet.json + * x-ms-original-file: 2025-11-01/RegistryGet.json */ /** * Sample code: RegistryGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java index 492de9024e02..7e3930cf9970 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesGetPrivateLinkResourceSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryGetPrivateLinkResource.json + * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json */ /** * Sample code: RegistryGetPrivateLinkResource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java index 082399afa953..ffbda54e0373 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -14,9 +14,7 @@ */ public final class RegistriesImportImageSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ImportImageFromPublicRegistry.json + * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json */ /** * Sample code: ImportImageFromPublicRegistry. @@ -39,9 +37,7 @@ public static void importImageFromPublicRegistry(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ImportImageByTag.json + * x-ms-original-file: 2025-11-01/ImportImageByTag.json */ /** * Sample code: ImportImageByTag. @@ -64,9 +60,7 @@ public static void importImageByTag(com.azure.resourcemanager.AzureResourceManag } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ImportImageByManifestDigest.json + * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json */ /** * Sample code: ImportImageByManifestDigest. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java index af8ef35a0ee0..99fa534fd9a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryListByResourceGroup.json + * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json */ /** * Sample code: RegistryListByResourceGroup. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java index 688032373f83..dc9dd530a4c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListCredentialsSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryListCredentials.json + * x-ms-original-file: 2025-11-01/RegistryListCredentials.json */ /** * Sample code: RegistryListCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java index 030f45aad6ab..767b14d7ed5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListPrivateLinkResourcesSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryListPrivateLinkResources.json + * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json */ /** * Sample code: RegistryListPrivateLinkResources. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java index cf5b87d79e27..37641c4994db 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryList.json + * x-ms-original-file: 2025-11-01/RegistryList.json */ /** * Sample code: RegistryList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java index dfdeb2f07462..4f4bc3477558 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListUsagesSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryListUsages.json + * x-ms-original-file: 2025-11-01/RegistryListUsages.json */ /** * Sample code: RegistryListUsages. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java index 519dd73c3526..924c1f669e94 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -12,9 +12,7 @@ */ public final class RegistriesRegenerateCredentialSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryRegenerateCredential.json + * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json */ /** * Sample code: RegistryRegenerateCredential. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java index 0ebd9dc62125..3f229bfc2096 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -16,9 +16,7 @@ */ public final class RegistriesUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * RegistryUpdate.json + * x-ms-original-file: 2025-11-01/RegistryUpdate.json */ /** * Sample code: RegistryUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java index d746968ac081..36bb9c92d7ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -14,9 +14,7 @@ */ public final class ReplicationsCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationCreate.json + * x-ms-original-file: 2025-11-01/ReplicationCreate.json */ /** * Sample code: ReplicationCreate. @@ -34,9 +32,7 @@ public static void replicationCreate(com.azure.resourcemanager.AzureResourceMana } /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationCreateZoneRedundant.json + * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json */ /** * Sample code: ReplicationCreateZoneRedundant. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java index f81235516e90..78a1dba4046d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ReplicationsDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationDelete.json + * x-ms-original-file: 2025-11-01/ReplicationDelete.json */ /** * Sample code: ReplicationDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java index a5fecd808cc6..868de61bbcce 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ReplicationsGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationGet.json + * x-ms-original-file: 2025-11-01/ReplicationGet.json */ /** * Sample code: ReplicationGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java index 74b873b854e4..a2a20e46326a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ReplicationsListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationList.json + * x-ms-original-file: 2025-11-01/ReplicationList.json */ /** * Sample code: ReplicationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java index 059899793e4d..76de4a5e7ea9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -13,9 +13,7 @@ */ public final class ReplicationsUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ReplicationUpdate.json + * x-ms-original-file: 2025-11-01/ReplicationUpdate.json */ /** * Sample code: ReplicationUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java index 67ffd5cdbd2b..cf6ab3dac0e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -12,9 +12,7 @@ */ public final class ScopeMapsCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ScopeMapCreate.json + * x-ms-original-file: 2025-11-01/ScopeMapCreate.json */ /** * Sample code: ScopeMapCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java index ed0b00e2a10a..55c01dd0f8f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ScopeMapsDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ScopeMapDelete.json + * x-ms-original-file: 2025-11-01/ScopeMapDelete.json */ /** * Sample code: ScopeMapDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java index cf74cc7c21fe..2f19ff823bc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ScopeMapsGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ScopeMapGet.json + * x-ms-original-file: 2025-11-01/ScopeMapGet.json */ /** * Sample code: ScopeMapGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java index 38a1efecc618..c3d9637afe1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class ScopeMapsListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ScopeMapList.json + * x-ms-original-file: 2025-11-01/ScopeMapList.json */ /** * Sample code: ScopeMapList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java index 7e9641ef12ec..2d8c9a2122aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -12,9 +12,7 @@ */ public final class ScopeMapsUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * ScopeMapUpdate.json + * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json */ /** * Sample code: ScopeMapUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java index b40558bbf752..c58639b227f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -16,9 +16,7 @@ */ public final class TokensCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * TokenCreate.json + * x-ms-original-file: 2025-11-01/TokenCreate.json */ /** * Sample code: TokenCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java index 13cef93ed9df..01d6ffa62b33 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class TokensDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * TokenDelete.json + * x-ms-original-file: 2025-11-01/TokenDelete.json */ /** * Sample code: TokenDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java index a19019a7cee6..b5db17acfce9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class TokensGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * TokenGet.json + * x-ms-original-file: 2025-11-01/TokenGet.json */ /** * Sample code: TokenGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java index a16111a62472..839fb2a256ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class TokensListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * TokenList.json + * x-ms-original-file: 2025-11-01/TokenList.json */ /** * Sample code: TokenList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java index 97edbc015996..b1cd274d4be0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -15,9 +15,7 @@ */ public final class TokensUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * TokenUpdate.json + * x-ms-original-file: 2025-11-01/TokenUpdate.json */ /** * Sample code: TokenUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java index eae3286c1b9d..3e95b5433e99 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -16,9 +16,7 @@ */ public final class WebhooksCreateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookCreate.json + * x-ms-original-file: 2025-11-01/WebhookCreate.json */ /** * Sample code: WebhookCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java index 35b758311d1c..5e4442c888ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksDeleteSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookDelete.json + * x-ms-original-file: 2025-11-01/WebhookDelete.json */ /** * Sample code: WebhookDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java index bffb75f11ad5..884a7a9bf9dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksGetCallbackConfigSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookGetCallbackConfig.json + * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json */ /** * Sample code: WebhookGetCallbackConfig. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java index 2af811aeb8e4..899bde57a53d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksGetSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookGet.json + * x-ms-original-file: 2025-11-01/WebhookGet.json */ /** * Sample code: WebhookGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java index 12c791ff746a..3fb135ba14c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksListEventsSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookListEvents.json + * x-ms-original-file: 2025-11-01/WebhookListEvents.json */ /** * Sample code: WebhookListEvents. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java index 15540a00878c..1a5207937648 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksListSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookList.json + * x-ms-original-file: 2025-11-01/WebhookList.json */ /** * Sample code: WebhookList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java index b1fd14f7798a..d73af7bd2dac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -9,9 +9,7 @@ */ public final class WebhooksPingSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookPing.json + * x-ms-original-file: 2025-11-01/WebhookPing.json */ /** * Sample code: WebhookPing. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java index 6ecdd4347fb8..e0481a9104a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerregistry.generated; @@ -16,9 +16,7 @@ */ public final class WebhooksUpdateSamples { /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ - * WebhookUpdate.json + * x-ms-original-file: 2025-11-01/WebhookUpdate.json */ /** * Sample code: WebhookUpdate. From 08bdd0b049c6a93eee54e89b4828d679ea313595 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 12:47:06 +0800 Subject: [PATCH 04/16] open models to core --- .../src/main/java/module-info.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/module-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/module-info.java index 3b6a68d62fb8..fa71ae2dd8ee 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/module-info.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/module-info.java @@ -13,4 +13,5 @@ // open packages specifically for azure core opens com.azure.resourcemanager.containerregistry.fluent.models to com.azure.core; opens com.azure.resourcemanager.containerregistry.models to com.azure.core; + opens com.azure.resourcemanager.containerregistry.implementation.models to com.azure.core; } From f5e7197dfe55da63adaca742b25cf9a1c1c2b0a6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 12:58:53 +0800 Subject: [PATCH 05/16] deprecate Tasks part of the lib --- .../ContainerRegistryManager.java | 6 ++ .../fluent/AgentPoolsClient.java | 66 ++++++++++--------- ...ontainerRegistryTasksManagementClient.java | 4 +- .../fluent/RegistryTasksClient.java | 2 + .../containerregistry/fluent/RunsClient.java | 2 + .../fluent/TaskRunsClient.java | 2 + .../containerregistry/fluent/TasksClient.java | 2 + .../containerregistry/models/Registries.java | 4 ++ .../models/RegistryTask.java | 8 ++- .../models/RegistryTaskRun.java | 8 ++- .../models/RegistryTaskRuns.java | 8 ++- .../models/RegistryTasks.java | 8 ++- 12 files changed, 79 insertions(+), 41 deletions(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index 642f98bbe52b..6d772393afef 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -122,7 +122,9 @@ public Registries containerRegistries() { * Gets the current instance of ContainerRegistryManager's tasks. * * @return the tasks of the current instance of ContainerRegistryManager. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ + @Deprecated public RegistryTasks containerRegistryTasks() { if (this.tasks == null) { this.tasks = new RegistryTasksImpl(this); @@ -134,7 +136,9 @@ public RegistryTasks containerRegistryTasks() { * Gets the current instance of ContainerRegistryManager's registry task runs. * * @return the registry task runs of the current instance of ContainerRegistryManager. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ + @Deprecated public RegistryTaskRuns registryTaskRuns() { if (this.registryTaskRuns == null) { this.registryTaskRuns = new RegistryTaskRunsImpl(this); @@ -147,7 +151,9 @@ public RegistryTaskRuns registryTaskRuns() { * based on Azure REST API. * * @return wrapped inner task client. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ + @Deprecated public ContainerRegistryTasksManagementClient taskClient() { return taskClient; } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/AgentPoolsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/AgentPoolsClient.java index c48bc28d7c72..648b629b8b24 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/AgentPoolsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/AgentPoolsClient.java @@ -21,11 +21,13 @@ /** * An instance of this class provides access to all the operations defined in AgentPoolsClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface AgentPoolsClient { /** * Gets the detailed information for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -41,7 +43,7 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets the detailed information for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -55,7 +57,7 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets the detailed information for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -71,7 +73,7 @@ Response getWithResponse(String resourceGroupName, String regist /** * Gets the detailed information for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -85,7 +87,7 @@ Response getWithResponse(String resourceGroupName, String regist /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -102,7 +104,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -118,7 +120,7 @@ PollerFlux, AgentPoolInner> beginCreateAsync(String r /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -134,7 +136,7 @@ SyncPoller, AgentPoolInner> beginCreate(String resour /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -151,7 +153,7 @@ SyncPoller, AgentPoolInner> beginCreate(String resour /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -167,7 +169,7 @@ Mono createAsync(String resourceGroupName, String registryName, /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -183,7 +185,7 @@ AgentPoolInner create(String resourceGroupName, String registryName, String agen /** * Creates an agent pool for a container registry with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -200,7 +202,7 @@ AgentPoolInner create(String resourceGroupName, String registryName, String agen /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -215,7 +217,7 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -230,7 +232,7 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -244,7 +246,7 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -260,7 +262,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -274,7 +276,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -287,7 +289,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a specified agent pool resource. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -301,7 +303,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -318,7 +320,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -334,7 +336,7 @@ PollerFlux, AgentPoolInner> beginUpdateAsync(String r /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -350,7 +352,7 @@ SyncPoller, AgentPoolInner> beginUpdate(String resour /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -367,7 +369,7 @@ SyncPoller, AgentPoolInner> beginUpdate(String resour /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -383,7 +385,7 @@ Mono updateAsync(String resourceGroupName, String registryName, /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -399,7 +401,7 @@ AgentPoolInner update(String resourceGroupName, String registryName, String agen /** * Updates an agent pool with the specified parameters. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -416,7 +418,7 @@ AgentPoolInner update(String resourceGroupName, String registryName, String agen /** * Lists all the agent pools for a specified container registry. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -429,7 +431,7 @@ AgentPoolInner update(String resourceGroupName, String registryName, String agen /** * Lists all the agent pools for a specified container registry. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -442,7 +444,7 @@ AgentPoolInner update(String resourceGroupName, String registryName, String agen /** * Lists all the agent pools for a specified container registry. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param context The context to associate with this operation. @@ -456,7 +458,7 @@ AgentPoolInner update(String resourceGroupName, String registryName, String agen /** * Gets the count of queued runs for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -472,7 +474,7 @@ Mono> getQueueStatusWithResponseAsync(String /** * Gets the count of queued runs for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -487,7 +489,7 @@ Mono getQueueStatusAsync(String resourceGroupName, St /** * Gets the count of queued runs for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. @@ -503,7 +505,7 @@ Response getQueueStatusWithResponse(String resourceGr /** * Gets the count of queued runs for a given agent pool. - * + * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param agentPoolName The name of the agent pool. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryTasksManagementClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryTasksManagementClient.java index 756d18968034..10a754620048 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryTasksManagementClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryTasksManagementClient.java @@ -7,8 +7,10 @@ import java.time.Duration; /** - * The interface for ContainerRegistryTasksManagementClient class. + * An instance of this class provides access to all the operations defined in ContainerRegistryTasksManagementClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface ContainerRegistryTasksManagementClient { /** * Gets The Microsoft Azure subscription ID. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java index 24b172ae4ea6..9adfe8130390 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java @@ -19,7 +19,9 @@ /** * An instance of this class provides access to all the operations defined in RegistryTasksClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface RegistryTasksClient { /** * Schedules a new run based on the request parameters and add it to the run queue. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java index d6c282196a48..a32e26b315c8 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java @@ -21,7 +21,9 @@ /** * An instance of this class provides access to all the operations defined in RunsClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface RunsClient { /** * Gets all the runs for a registry. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java index 8ab63b2f8e28..1d6ad23d242f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java @@ -20,7 +20,9 @@ /** * An instance of this class provides access to all the operations defined in TaskRunsClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface TaskRunsClient { /** * Gets the detailed information for a given task run. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java index 65cf89781850..815437ffdb9f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java @@ -20,7 +20,9 @@ /** * An instance of this class provides access to all the operations defined in TasksClient. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ +@Deprecated public interface TasksClient { /** * Lists all the tasks for a specified container registry. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Registries.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Registries.java index 7df96dfebebd..56ac07f36466 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Registries.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Registries.java @@ -110,7 +110,9 @@ Mono regenerateCredentialAsync(String resourceGroupName, St * @param rgName the name of the resource group. * @param acrName the name of the container. * @return the URL of the build source upload. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ + @Deprecated SourceUploadDefinition getBuildSourceUploadUrl(String rgName, String acrName); /** @@ -119,7 +121,9 @@ Mono regenerateCredentialAsync(String resourceGroupName, St * @param rgName the name of the resource group. * @param acrName the name of the container. * @return the URL of the build source upload. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. */ + @Deprecated Mono getBuildSourceUploadUrlAsync(String rgName, String acrName); /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTask.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTask.java index 3bf75618dca7..06eb0d9cf995 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTask.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTask.java @@ -15,8 +15,12 @@ import java.time.OffsetDateTime; import java.util.Map; -/** An immutable client-side representation of an Azure registry task. */ -@Fluent() +/** + * An immutable client-side representation of an Azure registry task. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. + */ +@Deprecated +@Fluent public interface RegistryTask extends Resource, HasInnerModel, Refreshable, Updatable { diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRun.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRun.java index 5e6d9e2e9d8e..089373a12a15 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRun.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRun.java @@ -10,8 +10,12 @@ import java.time.OffsetDateTime; import java.util.Map; -/** An immutable client-side representation of an Azure RegistryDockerTaskRunRequest registry task run request. */ -@Fluent() +/** + * An immutable client-side representation of an Azure RegistryDockerTaskRunRequest registry task run request. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. + */ +@Deprecated +@Fluent public interface RegistryTaskRun extends HasInnerModel, Refreshable { /** * Gets the name of the resource group. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRuns.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRuns.java index 4bd3d485e52d..7d7c8b5a0b89 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRuns.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTaskRuns.java @@ -7,8 +7,12 @@ import com.azure.core.http.rest.PagedIterable; import reactor.core.publisher.Mono; -/** An immutable client-side representation of collection of Azure registry task runs. */ -@Fluent() +/** + * An immutable client-side representation of collection of Azure registry task runs. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. + */ +@Deprecated +@Fluent public interface RegistryTaskRuns { /** * The function that begins the steps to schedule a run. diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTasks.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTasks.java index 33be611321eb..23221ba0e4e3 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTasks.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryTasks.java @@ -8,8 +8,12 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; import reactor.core.publisher.Mono; -/** Interface to define the RegistryTasks collection. */ -@Fluent() +/** + * Interface to define the RegistryTasks collection. + * @deprecated Use azure-resourcemanager-containerregistry-tasks lib. + */ +@Deprecated +@Fluent public interface RegistryTasks extends SupportsCreating { /** * Lists the tasks in a registry asynchronously. From 034f56da692169910f7d5e12410dcf5e83cb6db2 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Fri, 23 Jan 2026 06:01:07 +0000 Subject: [PATCH 06/16] Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2025-11-01, SDK Release Type: stable, and CommitSHA: '149c9171215a4b036b34347dd855df2add0a216d' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5788782 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 60 +++++++++---------- .../tsp-location.yaml | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index ed49eff7e16f..017984f3cc6e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -33,12 +33,12 @@ #### `models.OperationMetricSpecificationDefinition` was modified * `OperationMetricSpecificationDefinition()` was changed to private access -* `withAggregationType(java.lang.String)` was removed +* `withInternalMetricName(java.lang.String)` was removed +* `withName(java.lang.String)` was removed * `withDisplayName(java.lang.String)` was removed -* `withUnit(java.lang.String)` was removed * `withDisplayDescription(java.lang.String)` was removed -* `withName(java.lang.String)` was removed -* `withInternalMetricName(java.lang.String)` was removed +* `withAggregationType(java.lang.String)` was removed +* `withUnit(java.lang.String)` was removed #### `models.TlsProperties` was modified @@ -47,8 +47,8 @@ #### `models.RegistryPassword` was modified * `RegistryPassword()` was changed to private access -* `withName(models.PasswordName)` was removed * `withValue(java.lang.String)` was removed +* `withName(models.PasswordName)` was removed #### `models.TlsCertificateProperties` was modified @@ -57,15 +57,15 @@ #### `models.Target` was modified * `Target()` was changed to private access -* `withMediaType(java.lang.String)` was removed -* `withName(java.lang.String)` was removed * `withUrl(java.lang.String)` was removed -* `withDigest(java.lang.String)` was removed +* `withLength(java.lang.Long)` was removed * `withTag(java.lang.String)` was removed * `withVersion(java.lang.String)` was removed -* `withSize(java.lang.Long)` was removed -* `withLength(java.lang.Long)` was removed +* `withMediaType(java.lang.String)` was removed * `withRepository(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `withDigest(java.lang.String)` was removed +* `withSize(java.lang.Long)` was removed #### `models.StatusDetailProperties` was modified @@ -95,46 +95,46 @@ #### `models.RegistryNameCheckRequest` was modified -* `resourceGroupName()` was removed -* `withResourceGroupName(java.lang.String)` was removed -* `java.lang.String type()` -> `models.ContainerRegistryResourceType type()` * `autoGeneratedDomainNameLabelScope()` was removed +* `java.lang.String type()` -> `models.ContainerRegistryResourceType type()` * `withAutoGeneratedDomainNameLabelScope(models.AutoGeneratedDomainNameLabelScope)` was removed +* `resourceGroupName()` was removed +* `withResourceGroupName(java.lang.String)` was removed #### `models.RegistryUsage` was modified * `RegistryUsage()` was changed to private access * `withLimit(java.lang.Long)` was removed -* `withCurrentValue(java.lang.Long)` was removed * `withName(java.lang.String)` was removed * `withUnit(models.RegistryUsageUnit)` was removed +* `withCurrentValue(java.lang.Long)` was removed #### `models.EventResponseMessage` was modified * `EventResponseMessage()` was changed to private access -* `withReasonPhrase(java.lang.String)` was removed -* `withHeaders(java.util.Map)` was removed -* `withStatusCode(java.lang.String)` was removed * `withVersion(java.lang.String)` was removed * `withContent(java.lang.String)` was removed +* `withHeaders(java.util.Map)` was removed +* `withReasonPhrase(java.lang.String)` was removed +* `withStatusCode(java.lang.String)` was removed #### `models.EventContent` was modified * `EventContent()` was changed to private access +* `withRequest(models.Request)` was removed +* `withTarget(models.Target)` was removed * `withSource(models.Source)` was removed +* `withAction(java.lang.String)` was removed +* `withActor(models.Actor)` was removed * `withTimestamp(java.time.OffsetDateTime)` was removed -* `withRequest(models.Request)` was removed * `withId(java.lang.String)` was removed -* `withActor(models.Actor)` was removed -* `withAction(java.lang.String)` was removed -* `withTarget(models.Target)` was removed #### `models.OperationDisplayDefinition` was modified * `OperationDisplayDefinition()` was changed to private access -* `withDescription(java.lang.String)` was removed -* `withResource(java.lang.String)` was removed * `withProvider(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed * `withOperation(java.lang.String)` was removed #### `models.ActivationProperties` was modified @@ -144,34 +144,34 @@ #### `models.EventRequestMessage` was modified * `EventRequestMessage()` was changed to private access -* `withContent(models.EventContent)` was removed -* `withHeaders(java.util.Map)` was removed * `withMethod(java.lang.String)` was removed * `withVersion(java.lang.String)` was removed +* `withHeaders(java.util.Map)` was removed * `withRequestUri(java.lang.String)` was removed +* `withContent(models.EventContent)` was removed #### `models.CredentialHealth` was modified * `CredentialHealth()` was changed to private access +* `withErrorMessage(java.lang.String)` was removed * `withStatus(models.CredentialHealthStatus)` was removed * `withErrorCode(java.lang.String)` was removed -* `withErrorMessage(java.lang.String)` was removed #### `models.OperationLogSpecificationDefinition` was modified * `OperationLogSpecificationDefinition()` was changed to private access +* `withName(java.lang.String)` was removed * `withBlobDuration(java.lang.String)` was removed * `withDisplayName(java.lang.String)` was removed -* `withName(java.lang.String)` was removed #### `models.Request` was modified * `Request()` was changed to private access -* `withMethod(java.lang.String)` was removed -* `withUseragent(java.lang.String)` was removed * `withId(java.lang.String)` was removed -* `withAddr(java.lang.String)` was removed * `withHost(java.lang.String)` was removed +* `withAddr(java.lang.String)` was removed +* `withUseragent(java.lang.String)` was removed +* `withMethod(java.lang.String)` was removed ### Features Added diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml index e515baa53e83..ce91de989f03 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry -commit: 926d47e176855de8c16d39bde587afe25cb1f20d +commit: 149c9171215a4b036b34347dd855df2add0a216d repo: Azure/azure-rest-api-specs additionalDirectories: From 83568280ef0c4c779888813e80f7f4c16fd7d901 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 15:39:17 +0800 Subject: [PATCH 07/16] temporary disable a test --- .../com/azure/resourcemanager/AzureResourceManagerTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java index 3032cc9f69bc..3ebebb7af016 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java @@ -1237,6 +1237,7 @@ public void testContainerInstanceWithPublicIpAddressWithUserAssignedMsi() { Assertions.assertFalse(containerGroupOperations.isEmpty()); } + @Disabled("Diff on 'Accept' header. Live test is good, re-enable the test after publish new container registry lib.") @Test public void testContainerRegistry() throws Exception { new TestContainerRegistry().runTest(azureResourceManager.containerRegistries(), From 23da01c1dc1b102ad0cd1d0653d92b93a6f1b0c8 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 16:01:07 +0800 Subject: [PATCH 08/16] revapi suppress --- eng/lintingconfigs/revapi/track2/revapi.json | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index 574ce97681e7..488bf7ba1c16 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -806,6 +806,56 @@ "code": "java.method.removed", "old": "method com.azure.resourcemanager.compute.models.ExecutedValidation com.azure.resourcemanager.compute.models.ExecutedValidation::withStatus(com.azure.resourcemanager.compute.models.ValidationStatus)", "justification": "ExecutedValidation is output-only; fluent setter removed as part of immutable model cleanup." + }, + { + "code" : "java.class.removed", + "old" : "class com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope", + "justification": "Fix by service: the feature only exists in preview api-version." + }, + { + "code" : "java.method.removed", + "old" : "method com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest::autoGeneratedDomainNameLabelScope()", + "justification": "Fix by service: the feature only exists in preview api-version." + }, + { + "code" : "java.method.removed", + "old" : "method java.lang.String com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest::resourceGroupName()", + "justification": "Fix by service: the feature only exists in preview api-version." + }, + { + "ignore": true, + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method void com\\.azure\\.resourcemanager\\.containerregistry\\.models\\..*\\:\\:\\\\(\\)" + }, + "justification": "Output-only immutable models' constructors are now private." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerregistry\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are now package-private if it's being used by child class." + }, + { + "ignore": true, + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerregistry\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are removed if no explicit usage." + }, + { + "code": "java.class.removed", + "old" : { + "matcher": "regex", + "match": "class com\\.azure\\.resourcemanager\\.containerregistry\\.models\\..*ListResult" + }, + "justification": "Pageable models moved to implementation package. Unlikely used by user." } ] } From 116417060015b966d0e605a5f49643fbf514fc4a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 16:21:52 +0800 Subject: [PATCH 09/16] add test of webhook --- .../RegistryOperationsTests.java | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java index 812f06ccf58f..fd8d3ba536a9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java @@ -5,11 +5,15 @@ import com.azure.core.management.Region; import com.azure.resourcemanager.containerregistry.models.Registry; +import com.azure.resourcemanager.containerregistry.models.Webhook; +import com.azure.resourcemanager.containerregistry.models.WebhookAction; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class RegistryOperationsTests extends RegistryTest { + private static final Region REGION = Region.US_WEST3; + @Override protected void cleanUpResources() { resourceManager.resourceGroups().beginDeleteByName(rgName); @@ -20,7 +24,7 @@ public void canCreateContainerRegisterWithZoneRedundancy() { final String acrName = generateRandomResourceName("acr", 10); Registry registry = registryManager.containerRegistries() .define(acrName) - .withRegion(Region.US_EAST) + .withRegion(REGION) .withNewResourceGroup(rgName) .withPremiumSku() .withoutRegistryNameAsAdminUser() @@ -28,4 +32,31 @@ public void canCreateContainerRegisterWithZoneRedundancy() { .create(); Assertions.assertTrue(registry.isZoneRedundancyEnabled()); } + + @Test + public void canCreateContainerRegisterWithWebhook() { + final String acrName = generateRandomResourceName("acr", 10); + Registry registry = registryManager.containerRegistries() + .define(acrName) + .withRegion(REGION) + .withNewResourceGroup(rgName) + .withPremiumSku() + .withoutRegistryNameAsAdminUser() + .defineWebhook("acreventpush") + .withTriggerWhen(WebhookAction.PUSH) + .withServiceUri("https://contoso.com/acreventpush") + .attach() + .create(); + Assertions.assertEquals("https://contoso.com/acreventpush", + registry.webhooks().get("acreventpush").serviceUri()); + + registry.update() + .defineWebhook("acreventdelete") + .withTriggerWhen(WebhookAction.DELETE) + .withServiceUri("https://contoso.com/acreventdelete") + .attach() + .apply(); + Assertions.assertEquals("https://contoso.com/acreventdelete", + registry.webhooks().get("acreventdelete").serviceUri()); + } } From 959b6187a72cba03228d3a742d54c4fd6c1a0038 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 16:26:04 +0800 Subject: [PATCH 10/16] test record --- .../azure-resourcemanager-containerregistry/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json index ddf3646ccafe..5033f610ceb1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/containerregistry/azure-resourcemanager-containerregistry", - "Tag": "java/containerregistry/azure-resourcemanager-containerregistry_cdca772802" + "Tag": "java/containerregistry/azure-resourcemanager-containerregistry_9b187e0299" } From d6a77755112b2e330e4f115cad0bea28ea9e94e0 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 16:30:13 +0800 Subject: [PATCH 11/16] regen with commit on https://github.com/Azure/azure-rest-api-specs/pull/39865 --- .../models/ContainerRegistryResourceType.java | 51 ------------------- .../models/RegistryNameCheckRequest.java | 11 ++-- .../containerregistry/models/Source.java | 14 ++--- ...rcemanager-containerregistry_metadata.json | 2 +- .../generated/ActorTests.java | 4 +- .../generated/CallbackConfigInnerTests.java | 6 +-- .../generated/EventContentTests.java | 42 +++++++-------- .../generated/EventInfoInnerTests.java | 4 +- .../generated/EventRequestMessageTests.java | 50 +++++++++--------- .../GarbageCollectionPropertiesTests.java | 12 ++--- .../generated/LoggingPropertiesTests.java | 8 +-- .../generated/LoginServerPropertiesTests.java | 2 +- ...vateEndpointConnectionListResultTests.java | 10 ++-- .../PrivateLinkResourceInnerTests.java | 4 +- .../PrivateLinkResourceListResultTests.java | 6 +-- .../PrivateLinkResourcePropertiesTests.java | 7 +-- .../RegistryNameCheckRequestTests.java | 11 ++-- .../RegistryNameStatusInnerTests.java | 8 +-- .../generated/ReplicationInnerTests.java | 26 +++++----- .../generated/ReplicationListResultTests.java | 10 ++-- .../generated/ReplicationPropertiesTests.java | 12 ++--- ...cationUpdateParametersPropertiesTests.java | 8 +-- .../ReplicationUpdateParametersTests.java | 12 ++--- .../generated/RequestTests.java | 15 +++--- .../generated/ScopeMapInnerTests.java | 13 ++--- .../generated/ScopeMapListResultTests.java | 8 +-- .../generated/ScopeMapPropertiesTests.java | 14 ++--- ...opeMapPropertiesUpdateParametersTests.java | 18 +++---- .../ScopeMapUpdateParametersTests.java | 14 ++--- .../generated/SourceTests.java | 8 +-- .../generated/SyncUpdatePropertiesTests.java | 20 ++++---- .../generated/TargetTests.java | 20 ++++---- .../TlsCertificatePropertiesTests.java | 2 +- .../generated/TlsPropertiesTests.java | 2 +- .../WebhookCreateParametersTests.java | 47 +++++++++-------- .../generated/WebhookInnerTests.java | 34 ++++++------- .../generated/WebhookListResultTests.java | 12 ++--- ...ebhookPropertiesCreateParametersTests.java | 30 ++++++----- .../generated/WebhookPropertiesTests.java | 15 +++--- ...ebhookPropertiesUpdateParametersTests.java | 34 +++++++------ .../WebhookUpdateParametersTests.java | 39 +++++++------- .../tsp-location.yaml | 4 +- 42 files changed, 309 insertions(+), 360 deletions(-) delete mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java deleted file mode 100644 index 33580bc36f23..000000000000 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerregistry.models; - -/** - * The resource type for Container Registry. - */ -public enum ContainerRegistryResourceType { - /** - * Enum value Microsoft.ContainerRegistry/registries. - */ - MICROSOFT_CONTAINER_REGISTRY_REGISTRIES("Microsoft.ContainerRegistry/registries"); - - /** - * The actual serialized value for a ContainerRegistryResourceType instance. - */ - private final String value; - - ContainerRegistryResourceType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ContainerRegistryResourceType instance. - * - * @param value the serialized value to parse. - * @return the parsed ContainerRegistryResourceType object, or null if unable to parse. - */ - public static ContainerRegistryResourceType fromString(String value) { - if (value == null) { - return null; - } - ContainerRegistryResourceType[] items = ContainerRegistryResourceType.values(); - for (ContainerRegistryResourceType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java index 66d4ab85c035..c6720702b3d4 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java @@ -25,7 +25,7 @@ public final class RegistryNameCheckRequest implements JsonSerializable { /* * The running instance of an application. Changes after each restart. */ - private String instanceID; + private String instanceId; /** * Creates an instance of Source class. @@ -45,12 +45,12 @@ public String addr() { } /** - * Get the instanceID property: The running instance of an application. Changes after each restart. + * Get the instanceId property: The running instance of an application. Changes after each restart. * - * @return the instanceID value. + * @return the instanceId value. */ - public String instanceID() { - return this.instanceID; + public String instanceId() { + return this.instanceId; } /** @@ -68,7 +68,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("addr", this.addr); - jsonWriter.writeStringField("instanceID", this.instanceID); + jsonWriter.writeStringField("instanceID", this.instanceId); return jsonWriter.writeEndObject(); } @@ -90,7 +90,7 @@ public static Source fromJson(JsonReader jsonReader) throws IOException { if ("addr".equals(fieldName)) { deserializedSource.addr = reader.getString(); } else if ("instanceID".equals(fieldName)) { - deserializedSource.instanceID = reader.getString(); + deserializedSource.instanceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json index e3c9f06542bb..79024780ad8e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/azure-resourcemanager-containerregistry_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-11-01","generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryUsageListResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Actor.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ContainerRegistryResourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventContent.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java","src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationLogSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java","src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Target.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-11-01","generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ConnectedRegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ScopeMapsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/TokensClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CallbackConfigInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ConnectedRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInfoInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/EventInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/OperationPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryListCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryUsageListResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ReplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ScopeMapPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TokenUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CacheRulesListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ConnectedRegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/CredentialSetListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/EventListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/RegistryListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ReplicationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ScopeMapListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/TokenListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/WebhookListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Action.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActionsRequired.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ActivationStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Actor.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuditLogStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/AzureADAuthenticationAsArmPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CertificateType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectedRegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventContent.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventRequestMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/EventResponseMessage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GarbageCollectionProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/GenerateCredentialsParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportImageParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSource.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ImportSourceCredentials.java","src/main/java/com/azure/resourcemanager/containerregistry/models/IpRule.java","src/main/java/com/azure/resourcemanager/containerregistry/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LogLevel.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoggingProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/LoginServerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleBypassOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationDisplayDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationLogSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationMetricSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/OperationServiceSpecificationDefinition.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ParentProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Policies.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerregistry/models/QuarantinePolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegenerateCredentialParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsage.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUsageUnit.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ReplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Request.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/RoleAssignmentMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ScopeMapUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Sku.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SkuTier.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Source.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Status.java","src/main/java/com/azure/resourcemanager/containerregistry/models/StatusDetailProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/Target.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsCertificateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TlsStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificate.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCertificateName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenCredentialsProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPassword.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenPasswordName.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TokenUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/TrustPolicyType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookAction.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookCreateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookStatus.java","src/main/java/com/azure/resourcemanager/containerregistry/models/WebhookUpdateParameters.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ZoneRedundancy.java","src/main/java/com/azure/resourcemanager/containerregistry/models/package-info.java","src/main/java/com/azure/resourcemanager/containerregistry/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java index a7c887f2dfbb..cff4b0272096 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ActorTests.java @@ -11,7 +11,7 @@ public final class ActorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Actor model = BinaryData.fromString("{\"name\":\"minrfdw\"}").toObject(Actor.class); - Assertions.assertEquals("minrfdw", model.name()); + Actor model = BinaryData.fromString("{\"name\":\"waezkojvd\"}").toObject(Actor.class); + Assertions.assertEquals("waezkojvd", model.name()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java index 43c60c12747c..815bbd8e652a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/CallbackConfigInnerTests.java @@ -12,9 +12,9 @@ public final class CallbackConfigInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CallbackConfigInner model = BinaryData.fromString( - "{\"serviceUri\":\"wem\",\"customHeaders\":{\"sfgytguslfead\":\"ncsdtclusiyp\",\"isxgfp\":\"ygqukyhejh\",\"vk\":\"lolp\"}}") + "{\"serviceUri\":\"znkbykutwpfhpagm\",\"customHeaders\":{\"kkze\":\"kdsnfdsdoakgtdl\",\"sdsttwvog\":\"dlhewp\",\"akufgmjz\":\"bbejdcngqqm\",\"grtwae\":\"wr\"}}") .toObject(CallbackConfigInner.class); - Assertions.assertEquals("wem", model.serviceUri()); - Assertions.assertEquals("ncsdtclusiyp", model.customHeaders().get("sfgytguslfead")); + Assertions.assertEquals("znkbykutwpfhpagm", model.serviceUri()); + Assertions.assertEquals("kdsnfdsdoakgtdl", model.customHeaders().get("kkze")); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java index 46dfdf51c516..d1259bf8c4a1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventContentTests.java @@ -13,27 +13,27 @@ public final class EventContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventContent model = BinaryData.fromString( - "{\"id\":\"sgsahmkycgr\",\"timestamp\":\"2021-04-05T08:15:46Z\",\"action\":\"uetae\",\"target\":{\"mediaType\":\"u\",\"size\":7946094316421332336,\"digest\":\"s\",\"length\":122203340642919775,\"repository\":\"ab\",\"url\":\"oefki\",\"tag\":\"vtpuqujmqlgk\",\"name\":\"tndoaongbjc\",\"version\":\"ujitcjedftww\"},\"request\":{\"id\":\"kojvd\",\"addr\":\"zfoqouicybxar\",\"host\":\"szufoxciqopidoa\",\"method\":\"iodhkhazxkhnz\",\"useragent\":\"nlwntoe\"},\"actor\":{\"name\":\"dwbwhkszzcmrvexz\"},\"source\":{\"addr\":\"t\",\"instanceID\":\"sfraoyzko\"}}") + "{\"id\":\"nsj\",\"timestamp\":\"2021-01-29T11:24:17Z\",\"action\":\"iagxsdszuempsbz\",\"target\":{\"mediaType\":\"beyvpnqicvinvkjj\",\"size\":2589593210312984687,\"digest\":\"uukzclewyhmlw\",\"length\":4550643593085904235,\"repository\":\"pofncck\",\"url\":\"fz\",\"tag\":\"hxx\",\"name\":\"yq\",\"version\":\"zfeqztppri\"},\"request\":{\"id\":\"or\",\"addr\":\"lt\",\"host\":\"mncwsobqwcsdb\",\"method\":\"dcfhucqdpf\",\"useragent\":\"glsbjjc\"},\"actor\":{\"name\":\"xbvtvudu\"},\"source\":{\"addr\":\"ormrlxqtvcofudfl\",\"instanceID\":\"gj\"}}") .toObject(EventContent.class); - Assertions.assertEquals("sgsahmkycgr", model.id()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.timestamp()); - Assertions.assertEquals("uetae", model.action()); - Assertions.assertEquals("u", model.target().mediaType()); - Assertions.assertEquals(7946094316421332336L, model.target().size()); - Assertions.assertEquals("s", model.target().digest()); - Assertions.assertEquals(122203340642919775L, model.target().length()); - Assertions.assertEquals("ab", model.target().repository()); - Assertions.assertEquals("oefki", model.target().url()); - Assertions.assertEquals("vtpuqujmqlgk", model.target().tag()); - Assertions.assertEquals("tndoaongbjc", model.target().name()); - Assertions.assertEquals("ujitcjedftww", model.target().version()); - Assertions.assertEquals("kojvd", model.request().id()); - Assertions.assertEquals("zfoqouicybxar", model.request().addr()); - Assertions.assertEquals("szufoxciqopidoa", model.request().host()); - Assertions.assertEquals("iodhkhazxkhnz", model.request().method()); - Assertions.assertEquals("nlwntoe", model.request().useragent()); - Assertions.assertEquals("dwbwhkszzcmrvexz", model.actor().name()); - Assertions.assertEquals("t", model.source().addr()); - Assertions.assertEquals("sfraoyzko", model.source().instanceID()); + Assertions.assertEquals("nsj", model.id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-29T11:24:17Z"), model.timestamp()); + Assertions.assertEquals("iagxsdszuempsbz", model.action()); + Assertions.assertEquals("beyvpnqicvinvkjj", model.target().mediaType()); + Assertions.assertEquals(2589593210312984687L, model.target().size()); + Assertions.assertEquals("uukzclewyhmlw", model.target().digest()); + Assertions.assertEquals(4550643593085904235L, model.target().length()); + Assertions.assertEquals("pofncck", model.target().repository()); + Assertions.assertEquals("fz", model.target().url()); + Assertions.assertEquals("hxx", model.target().tag()); + Assertions.assertEquals("yq", model.target().name()); + Assertions.assertEquals("zfeqztppri", model.target().version()); + Assertions.assertEquals("or", model.request().id()); + Assertions.assertEquals("lt", model.request().addr()); + Assertions.assertEquals("mncwsobqwcsdb", model.request().host()); + Assertions.assertEquals("dcfhucqdpf", model.request().method()); + Assertions.assertEquals("glsbjjc", model.request().useragent()); + Assertions.assertEquals("xbvtvudu", model.actor().name()); + Assertions.assertEquals("ormrlxqtvcofudfl", model.source().addr()); + Assertions.assertEquals("gj", model.source().instanceId()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java index ed984a7bd79f..939f8ccd3039 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventInfoInnerTests.java @@ -11,7 +11,7 @@ public final class EventInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EventInfoInner model = BinaryData.fromString("{\"id\":\"osjswsr\"}").toObject(EventInfoInner.class); - Assertions.assertEquals("osjswsr", model.id()); + EventInfoInner model = BinaryData.fromString("{\"id\":\"expbtg\"}").toObject(EventInfoInner.class); + Assertions.assertEquals("expbtg", model.id()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java index 2e2908ba07c7..3ac1a0789ee9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/EventRequestMessageTests.java @@ -13,31 +13,31 @@ public final class EventRequestMessageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventRequestMessage model = BinaryData.fromString( - "{\"content\":{\"id\":\"wnujhemmsbvdk\",\"timestamp\":\"2021-11-07T07:11:51Z\",\"action\":\"tjinf\",\"target\":{\"mediaType\":\"fltkacjv\",\"size\":6490344131392989957,\"digest\":\"foakgg\",\"length\":5309095811404897814,\"repository\":\"ao\",\"url\":\"ulpqblylsyxkqjn\",\"tag\":\"ervtiagxs\",\"name\":\"zuempsbzkf\",\"version\":\"eyvpnqicvinvkj\"},\"request\":{\"id\":\"xrbuukzclew\",\"addr\":\"mlwpazt\",\"host\":\"ofncckwyfzqwhxxb\",\"method\":\"qa\",\"useragent\":\"feqztppriol\"},\"actor\":{\"name\":\"jaltolmnc\"},\"source\":{\"addr\":\"bqwcsdbnwdcf\",\"instanceID\":\"cqdpfuv\"}},\"headers\":{\"anvx\":\"bjj\",\"xqtvcofu\":\"vtvudutncormr\"},\"method\":\"lvkgju\",\"requestUri\":\"dknnqvsazn\",\"version\":\"tor\"}") + "{\"content\":{\"id\":\"ymareqnajxqugj\",\"timestamp\":\"2021-11-08T20:17:32Z\",\"action\":\"ubeddg\",\"target\":{\"mediaType\":\"fwqmzqalkrmn\",\"size\":5045179642883767359,\"digest\":\"acqqudfnbyxbaaab\",\"length\":3453666268896237887,\"repository\":\"ffimrzrtuzqogsex\",\"url\":\"vfdnwnwmewzsyyce\",\"tag\":\"soibjudpfrx\",\"name\":\"thzvaytdwkqbrqu\",\"version\":\"axhexiilivp\"},\"request\":{\"id\":\"irqtdqoa\",\"addr\":\"r\",\"host\":\"fgsqu\",\"method\":\"xrxxlep\",\"useragent\":\"amxjezwlw\"},\"actor\":{\"name\":\"uqlcvydy\"},\"source\":{\"addr\":\"dooaojkniodko\",\"instanceID\":\"bw\"}},\"headers\":{\"vdkcrodtj\":\"hemms\",\"lfoakg\":\"nfwjlfltkacjvefk\"},\"method\":\"fpagaowpulp\",\"requestUri\":\"lyls\",\"version\":\"k\"}") .toObject(EventRequestMessage.class); - Assertions.assertEquals("wnujhemmsbvdk", model.content().id()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T07:11:51Z"), model.content().timestamp()); - Assertions.assertEquals("tjinf", model.content().action()); - Assertions.assertEquals("fltkacjv", model.content().target().mediaType()); - Assertions.assertEquals(6490344131392989957L, model.content().target().size()); - Assertions.assertEquals("foakgg", model.content().target().digest()); - Assertions.assertEquals(5309095811404897814L, model.content().target().length()); - Assertions.assertEquals("ao", model.content().target().repository()); - Assertions.assertEquals("ulpqblylsyxkqjn", model.content().target().url()); - Assertions.assertEquals("ervtiagxs", model.content().target().tag()); - Assertions.assertEquals("zuempsbzkf", model.content().target().name()); - Assertions.assertEquals("eyvpnqicvinvkj", model.content().target().version()); - Assertions.assertEquals("xrbuukzclew", model.content().request().id()); - Assertions.assertEquals("mlwpazt", model.content().request().addr()); - Assertions.assertEquals("ofncckwyfzqwhxxb", model.content().request().host()); - Assertions.assertEquals("qa", model.content().request().method()); - Assertions.assertEquals("feqztppriol", model.content().request().useragent()); - Assertions.assertEquals("jaltolmnc", model.content().actor().name()); - Assertions.assertEquals("bqwcsdbnwdcf", model.content().source().addr()); - Assertions.assertEquals("cqdpfuv", model.content().source().instanceID()); - Assertions.assertEquals("bjj", model.headers().get("anvx")); - Assertions.assertEquals("lvkgju", model.method()); - Assertions.assertEquals("dknnqvsazn", model.requestUri()); - Assertions.assertEquals("tor", model.version()); + Assertions.assertEquals("ymareqnajxqugj", model.content().id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T20:17:32Z"), model.content().timestamp()); + Assertions.assertEquals("ubeddg", model.content().action()); + Assertions.assertEquals("fwqmzqalkrmn", model.content().target().mediaType()); + Assertions.assertEquals(5045179642883767359L, model.content().target().size()); + Assertions.assertEquals("acqqudfnbyxbaaab", model.content().target().digest()); + Assertions.assertEquals(3453666268896237887L, model.content().target().length()); + Assertions.assertEquals("ffimrzrtuzqogsex", model.content().target().repository()); + Assertions.assertEquals("vfdnwnwmewzsyyce", model.content().target().url()); + Assertions.assertEquals("soibjudpfrx", model.content().target().tag()); + Assertions.assertEquals("thzvaytdwkqbrqu", model.content().target().name()); + Assertions.assertEquals("axhexiilivp", model.content().target().version()); + Assertions.assertEquals("irqtdqoa", model.content().request().id()); + Assertions.assertEquals("r", model.content().request().addr()); + Assertions.assertEquals("fgsqu", model.content().request().host()); + Assertions.assertEquals("xrxxlep", model.content().request().method()); + Assertions.assertEquals("amxjezwlw", model.content().request().useragent()); + Assertions.assertEquals("uqlcvydy", model.content().actor().name()); + Assertions.assertEquals("dooaojkniodko", model.content().source().addr()); + Assertions.assertEquals("bw", model.content().source().instanceId()); + Assertions.assertEquals("hemms", model.headers().get("vdkcrodtj")); + Assertions.assertEquals("fpagaowpulp", model.method()); + Assertions.assertEquals("lyls", model.requestUri()); + Assertions.assertEquals("k", model.version()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java index 22f16ac29e79..14757d421a59 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/GarbageCollectionPropertiesTests.java @@ -11,18 +11,18 @@ public final class GarbageCollectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":true,\"schedule\":\"kfssxqukkf\"}") + GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":false,\"schedule\":\"azzmhjrunmpxt\"}") .toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("kfssxqukkf", model.schedule()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("azzmhjrunmpxt", model.schedule()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { GarbageCollectionProperties model - = new GarbageCollectionProperties().withEnabled(true).withSchedule("kfssxqukkf"); + = new GarbageCollectionProperties().withEnabled(false).withSchedule("azzmhjrunmpxt"); model = BinaryData.fromObject(model).toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("kfssxqukkf", model.schedule()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("azzmhjrunmpxt", model.schedule()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java index b1fa0a997354..47626c833683 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoggingPropertiesTests.java @@ -13,18 +13,18 @@ public final class LoggingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LoggingProperties model = BinaryData.fromString("{\"logLevel\":\"Error\",\"auditLogStatus\":\"Enabled\"}") + LoggingProperties model = BinaryData.fromString("{\"logLevel\":\"None\",\"auditLogStatus\":\"Enabled\"}") .toObject(LoggingProperties.class); - Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(LogLevel.NONE, model.logLevel()); Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LoggingProperties model - = new LoggingProperties().withLogLevel(LogLevel.ERROR).withAuditLogStatus(AuditLogStatus.ENABLED); + = new LoggingProperties().withLogLevel(LogLevel.NONE).withAuditLogStatus(AuditLogStatus.ENABLED); model = BinaryData.fromObject(model).toObject(LoggingProperties.class); - Assertions.assertEquals(LogLevel.ERROR, model.logLevel()); + Assertions.assertEquals(LogLevel.NONE, model.logLevel()); Assertions.assertEquals(AuditLogStatus.ENABLED, model.auditLogStatus()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java index eff13b2184d8..a6e891537a6a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/LoginServerPropertiesTests.java @@ -11,7 +11,7 @@ public final class LoginServerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoginServerProperties model = BinaryData.fromString( - "{\"host\":\"jancu\",\"tls\":{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"xbniwdjs\"}}}") + "{\"host\":\"flz\",\"tls\":{\"status\":\"Disabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"ycispnqzahmgkb\"}}}") .toObject(LoginServerProperties.class); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java index 4dc8ed4517c1..1630a94c8898 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionListResultTests.java @@ -14,14 +14,14 @@ public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qnermclfplphoxu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bgyepsbj\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"xywpmueefjzwfqkq\",\"name\":\"jidsuyonobglaoc\",\"type\":\"xtccmg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ytlmoyrxvwfud\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"xhdzhlrqjbhckf\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"bkyvp\",\"name\":\"ca\",\"type\":\"uzbpzkafku\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"nwbmeh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jusrtslhspk\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Creating\"},\"id\":\"fm\",\"name\":\"ag\",\"type\":\"vt\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"qkrhahvljua\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"c\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"laexqp\",\"name\":\"fadmws\",\"type\":\"crgvxpvgom\"}],\"nextLink\":\"fmisg\"}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"xbniwdjs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bpg\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"pzxbz\",\"name\":\"fzab\",\"type\":\"lcuhxwtctyqiklb\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"lwzbhvgyugu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"fssxqukkfplg\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Updating\"},\"id\":\"jzkdeslpvlopwi\",\"name\":\"ighxpk\",\"type\":\"wzbaiue\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"m\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"edeojnabc\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Failed\"},\"id\":\"psiebtfhvpes\",\"name\":\"pskrdqmh\",\"type\":\"jdhtldwkyzxu\"}],\"nextLink\":\"kn\"}") .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("qnermclfplphoxu", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.PENDING, + Assertions.assertEquals("xbniwdjs", model.value().get(0).privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bgyepsbj", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bpg", model.value().get(0).privateLinkServiceConnectionState().description()); Assertions.assertEquals(ActionsRequired.NONE, model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("fmisg", model.nextLink()); + Assertions.assertEquals("kn", model.nextLink()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java index e9a6dac52a58..e81a334ff4ad 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceInnerTests.java @@ -12,8 +12,8 @@ public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"okth\",\"requiredMembers\":[\"uaodsfcpk\",\"xodpuozmyzydagfu\"],\"requiredZoneNames\":[\"ezyiuokktwhrdxw\"]},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"}") + "{\"properties\":{\"groupId\":\"hy\",\"requiredMembers\":[\"rpmopjmc\",\"atuokthfuiu\"],\"requiredZoneNames\":[\"sfcpkvxodpuozm\",\"zydagfuaxbezyiuo\",\"ktwh\",\"dxwzywqsmbsurexi\"]},\"id\":\"ryocfsfksymdd\",\"name\":\"stkiiuxhqyud\",\"type\":\"o\"}") .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("ezyiuokktwhrdxw", model.requiredZoneNames().get(0)); + Assertions.assertEquals("sfcpkvxodpuozm", model.requiredZoneNames().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java index afadfd6fa83e..6641c8bafd3a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourceListResultTests.java @@ -12,9 +12,9 @@ public final class PrivateLinkResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"pxjmflbvvnchr\",\"requiredMembers\":[\"iwwzjuqk\",\"rsa\",\"iwkuofos\"],\"requiredZoneNames\":[\"sauuimj\",\"vxieduugidyj\",\"rfbyaosvexcso\",\"pclhocohslk\"]},\"id\":\"leggzfbu\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"igrxwburvjxxjn\",\"requiredMembers\":[\"dptkoenkouk\",\"vudwtiukbldng\"],\"requiredZoneNames\":[\"cipazyxoegukgjnp\",\"ucgygevqz\",\"typmrbpizcdrqjsd\"]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"},{\"properties\":{\"groupId\":\"eyeam\",\"requiredMembers\":[\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"requiredZoneNames\":[\"uttmrywnuzoqft\"]},\"id\":\"qzrnkcqvyxlwhz\",\"name\":\"sicohoqqnwvlry\",\"type\":\"vwhheunmmqhgyx\"},{\"properties\":{\"groupId\":\"noc\",\"requiredMembers\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"],\"requiredZoneNames\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]},\"id\":\"ihkaetcktvfc\",\"name\":\"vf\",\"type\":\"nkymuctqhjfbebrj\"}],\"nextLink\":\"erfuwuttt\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"watkpnpulexxb\",\"requiredMembers\":[\"truwiqzb\",\"j\",\"sovmyokacspkwl\",\"zdobpxjmflbvvnch\"],\"requiredZoneNames\":[\"ciwwzjuqkhr\"]},\"id\":\"jiwkuofoskghsau\",\"name\":\"imjm\",\"type\":\"xieduugidyjrr\"},{\"properties\":{\"groupId\":\"aos\",\"requiredMembers\":[\"csonpclhoco\"],\"requiredZoneNames\":[\"kevle\",\"gz\"]},\"id\":\"u\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"igrxwburvjxxjn\",\"requiredMembers\":[\"dptkoenkouk\",\"vudwtiukbldng\"],\"requiredZoneNames\":[\"cipazyxoegukgjnp\",\"ucgygevqz\",\"typmrbpizcdrqjsd\"]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"}],\"nextLink\":\"deyeamdphagalpbu\"}") .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("sauuimj", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("erfuwuttt", model.nextLink()); + Assertions.assertEquals("ciwwzjuqkhr", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("deyeamdphagalpbu", model.nextLink()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java index b96b0ff27eb0..d1bcd5aa481d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PrivateLinkResourcePropertiesTests.java @@ -11,9 +11,10 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"tki\",\"requiredMembers\":[\"hqyudxorrqnbpoc\",\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"requiredZoneNames\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"]}") + PrivateLinkResourceProperties model = BinaryData + .fromString( + "{\"groupId\":\"qn\",\"requiredMembers\":[\"czvyifq\",\"vkd\"],\"requiredZoneNames\":[\"llr\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("exxbczwtr", model.requiredZoneNames().get(0)); + Assertions.assertEquals("llr", model.requiredZoneNames().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java index 082110fd6e0d..98d7672551b9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameCheckRequestTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.containerregistry.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerregistry.models.ContainerRegistryResourceType; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; import org.junit.jupiter.api.Assertions; @@ -13,18 +12,16 @@ public final class RegistryNameCheckRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryNameCheckRequest model - = BinaryData.fromString("{\"name\":\"mdajv\",\"type\":\"Microsoft.ContainerRegistry/registries\"}") - .toObject(RegistryNameCheckRequest.class); + = BinaryData.fromString("{\"name\":\"mdajv\",\"type\":\"ysou\"}").toObject(RegistryNameCheckRequest.class); Assertions.assertEquals("mdajv", model.name()); - Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + Assertions.assertEquals("ysou", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES); + RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv").withType("ysou"); model = BinaryData.fromObject(model).toObject(RegistryNameCheckRequest.class); Assertions.assertEquals("mdajv", model.name()); - Assertions.assertEquals(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES, model.type()); + Assertions.assertEquals("ysou", model.type()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java index 0f90c4879c6e..b9293401deaf 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistryNameStatusInnerTests.java @@ -12,10 +12,10 @@ public final class RegistryNameStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryNameStatusInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"nqecanoaeup\",\"message\":\"yhltrpmopjmcm\"}") + = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"a\",\"message\":\"ae\"}") .toObject(RegistryNameStatusInner.class); - Assertions.assertTrue(model.nameAvailable()); - Assertions.assertEquals("nqecanoaeup", model.reason()); - Assertions.assertEquals("yhltrpmopjmcm", model.message()); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals("a", model.reason()); + Assertions.assertEquals("ae", model.message()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java index ae998b1e5531..34ba87b48921 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationInnerTests.java @@ -15,25 +15,25 @@ public final class ReplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"ldawkzbaliourqha\",\"message\":\"uhashsfwx\",\"timestamp\":\"2021-10-19T13:09:56Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"gicjooxdjeb\",\"tags\":{\"ecivyh\":\"cwwfvovbvme\"},\"id\":\"ce\",\"name\":\"ojgjrwjueiotwmc\",\"type\":\"ytdxwit\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":{\"displayStatus\":\"vlxotogtwrupqsx\",\"message\":\"micykvceoveilo\",\"timestamp\":\"2021-09-09T04:11:57Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"},\"location\":\"cnjbkcnxdhbt\",\"tags\":{\"wpn\":\"h\",\"mclfplphoxuscr\":\"jtoqne\"},\"id\":\"abgy\",\"name\":\"psbjta\",\"type\":\"qugxywpmueefjzwf\"}") .toObject(ReplicationInner.class); - Assertions.assertEquals("gicjooxdjeb", model.location()); - Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); - Assertions.assertFalse(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); + Assertions.assertEquals("cnjbkcnxdhbt", model.location()); + Assertions.assertEquals("h", model.tags().get("wpn")); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReplicationInner model = new ReplicationInner().withLocation("gicjooxdjeb") - .withTags(mapOf("ecivyh", "cwwfvovbvme")) - .withRegionEndpointEnabled(false) - .withZoneRedundancy(ZoneRedundancy.DISABLED); + ReplicationInner model = new ReplicationInner().withLocation("cnjbkcnxdhbt") + .withTags(mapOf("wpn", "h", "mclfplphoxuscr", "jtoqne")) + .withRegionEndpointEnabled(true) + .withZoneRedundancy(ZoneRedundancy.ENABLED); model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals("gicjooxdjeb", model.location()); - Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); - Assertions.assertFalse(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); + Assertions.assertEquals("cnjbkcnxdhbt", model.location()); + Assertions.assertEquals("h", model.tags().get("wpn")); + Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); } // Use "Map.of" if available diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java index d643f515e220..510971e9ec9e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java @@ -13,12 +13,12 @@ public final class ReplicationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":{\"displayStatus\":\"przqlveu\",\"message\":\"upjm\",\"timestamp\":\"2021-08-12T08:43:21Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"sw\",\"tags\":{\"blcg\":\"jriplrbpbewtghf\",\"nmxiebwwaloayqc\":\"xzvlvqhjkbegib\"},\"id\":\"wrtz\",\"name\":\"uzgwyzmhtx\",\"type\":\"ngmtsavjcb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":{\"displayStatus\":\"rknftguvriuhprwm\",\"message\":\"vxqtayriwwroyqbe\",\"timestamp\":\"2021-06-25T11:51:15Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"cnojvknmefqsg\",\"tags\":{\"j\":\"hapjyzhpvgqz\"},\"id\":\"vxdjzlmwlxkvugf\",\"name\":\"zovawjvz\",\"type\":\"nluthnnp\"}],\"nextLink\":\"xipeilpjzuaejx\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":{\"displayStatus\":\"ck\",\"message\":\"lhrxsbkyvpyc\",\"timestamp\":\"2021-10-20T05:52:01Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"},\"location\":\"afkuwb\",\"tags\":{\"hseyvju\":\"wbme\",\"hspkdeemao\":\"rts\"},\"id\":\"mx\",\"name\":\"gkvtmelmqkrhah\",\"type\":\"ljuahaquhcdh\"},{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"exq\",\"message\":\"fadmws\",\"timestamp\":\"2021-04-22T00:28:22Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"gomz\",\"tags\":{\"ali\":\"isgwbnbbeldawkz\",\"hashsfwxosow\":\"urqhaka\"},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"},{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"ojgjrwjueiotwmc\",\"message\":\"tdx\",\"timestamp\":\"2021-01-14T13:52:52Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"},\"location\":\"wgqwgxhn\",\"tags\":{\"bkpyc\":\"x\",\"l\":\"klwndnhjdauwhv\",\"xujznbmpowu\":\"zbtd\",\"lupj\":\"przqlveu\"},\"id\":\"khfxobbcswsrt\",\"name\":\"riplrbpbewtg\",\"type\":\"fgb\"}],\"nextLink\":\"gw\"}") .toObject(ReplicationListResult.class); - Assertions.assertEquals("sw", model.value().get(0).location()); - Assertions.assertEquals("jriplrbpbewtghf", model.value().get(0).tags().get("blcg")); - Assertions.assertFalse(model.value().get(0).regionEndpointEnabled()); + Assertions.assertEquals("afkuwb", model.value().get(0).location()); + Assertions.assertEquals("wbme", model.value().get(0).tags().get("hseyvju")); + Assertions.assertTrue(model.value().get(0).regionEndpointEnabled()); Assertions.assertEquals(ZoneRedundancy.ENABLED, model.value().get(0).zoneRedundancy()); - Assertions.assertEquals("xipeilpjzuaejx", model.nextLink()); + Assertions.assertEquals("gw", model.nextLink()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java index 401daacd0385..b40fc84cc18c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationPropertiesTests.java @@ -13,18 +13,18 @@ public final class ReplicationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"wgqwgxhn\",\"message\":\"kxfbkpycgklwndn\",\"timestamp\":\"2021-06-18T07:43:59Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"}") + "{\"provisioningState\":\"Failed\",\"status\":{\"displayStatus\":\"ids\",\"message\":\"onobglaocqx\",\"timestamp\":\"2021-08-26T18:25:08Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"}") .toObject(ReplicationProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + Assertions.assertFalse(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationProperties model - = new ReplicationProperties().withRegionEndpointEnabled(true).withZoneRedundancy(ZoneRedundancy.ENABLED); + = new ReplicationProperties().withRegionEndpointEnabled(false).withZoneRedundancy(ZoneRedundancy.DISABLED); model = BinaryData.fromObject(model).toObject(ReplicationProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); - Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); + Assertions.assertFalse(model.regionEndpointEnabled()); + Assertions.assertEquals(ZoneRedundancy.DISABLED, model.zoneRedundancy()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java index d5da462e40a1..4bc025bda728 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersPropertiesTests.java @@ -11,16 +11,16 @@ public final class ReplicationUpdateParametersPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReplicationUpdateParametersProperties model = BinaryData.fromString("{\"regionEndpointEnabled\":true}") + ReplicationUpdateParametersProperties model = BinaryData.fromString("{\"regionEndpointEnabled\":false}") .toObject(ReplicationUpdateParametersProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertFalse(model.regionEndpointEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationUpdateParametersProperties model - = new ReplicationUpdateParametersProperties().withRegionEndpointEnabled(true); + = new ReplicationUpdateParametersProperties().withRegionEndpointEnabled(false); model = BinaryData.fromObject(model).toObject(ReplicationUpdateParametersProperties.class); - Assertions.assertTrue(model.regionEndpointEnabled()); + Assertions.assertFalse(model.regionEndpointEnabled()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java index 19e1748bbea8..1303d2e46df3 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationUpdateParametersTests.java @@ -13,19 +13,19 @@ public final class ReplicationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReplicationUpdateParameters model - = BinaryData.fromString("{\"tags\":{\"zbtd\":\"l\"},\"properties\":{\"regionEndpointEnabled\":false}}") - .toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("l", model.tags().get("zbtd")); + ReplicationUpdateParameters model = BinaryData + .fromString("{\"tags\":{\"pz\":\"ytlmoyrxvwfud\"},\"properties\":{\"regionEndpointEnabled\":false}}") + .toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("ytlmoyrxvwfud", model.tags().get("pz")); Assertions.assertFalse(model.regionEndpointEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationUpdateParameters model - = new ReplicationUpdateParameters().withTags(mapOf("zbtd", "l")).withRegionEndpointEnabled(false); + = new ReplicationUpdateParameters().withTags(mapOf("pz", "ytlmoyrxvwfud")).withRegionEndpointEnabled(false); model = BinaryData.fromObject(model).toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("l", model.tags().get("zbtd")); + Assertions.assertEquals("ytlmoyrxvwfud", model.tags().get("pz")); Assertions.assertFalse(model.regionEndpointEnabled()); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java index da1c4e09b13d..e4262096fd97 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RequestTests.java @@ -11,13 +11,14 @@ public final class RequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Request model = BinaryData.fromString( - "{\"id\":\"vbbejdcng\",\"addr\":\"m\",\"host\":\"kufgmj\",\"method\":\"wr\",\"useragent\":\"rtwaenuuzko\"}") + Request model = BinaryData + .fromString( + "{\"id\":\"jmqlgkfb\",\"addr\":\"doaon\",\"host\":\"jcntuj\",\"method\":\"c\",\"useragent\":\"df\"}") .toObject(Request.class); - Assertions.assertEquals("vbbejdcng", model.id()); - Assertions.assertEquals("m", model.addr()); - Assertions.assertEquals("kufgmj", model.host()); - Assertions.assertEquals("wr", model.method()); - Assertions.assertEquals("rtwaenuuzko", model.useragent()); + Assertions.assertEquals("jmqlgkfb", model.id()); + Assertions.assertEquals("doaon", model.addr()); + Assertions.assertEquals("jcntuj", model.host()); + Assertions.assertEquals("c", model.method()); + Assertions.assertEquals("df", model.useragent()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java index 9ca2410c2c63..4ffe13eebb3b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapInnerTests.java @@ -13,17 +13,18 @@ public final class ScopeMapInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScopeMapInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"tskzbbtdzumveek\",\"type\":\"wozuhkf\",\"creationDate\":\"2021-11-15T23:25:51Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"f\"]},\"id\":\"luu\",\"name\":\"dttouwaboekqvkel\",\"type\":\"smv\"}") + "{\"properties\":{\"description\":\"lvqhjkbegibtnmx\",\"type\":\"bwwaloa\",\"creationDate\":\"2021-01-09T00:22:44Z\",\"provisioningState\":\"Creating\",\"actions\":[\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\"]},\"id\":\"ftguv\",\"name\":\"iuhprwmdyvxqta\",\"type\":\"riwwroy\"}") .toObject(ScopeMapInner.class); - Assertions.assertEquals("tskzbbtdzumveek", model.description()); - Assertions.assertEquals("f", model.actions().get(0)); + Assertions.assertEquals("lvqhjkbegibtnmx", model.description()); + Assertions.assertEquals("tzjuzgwyzmhtxo", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapInner model = new ScopeMapInner().withDescription("tskzbbtdzumveek").withActions(Arrays.asList("f")); + ScopeMapInner model = new ScopeMapInner().withDescription("lvqhjkbegibtnmx") + .withActions(Arrays.asList("tzjuzgwyzmhtxo", "gmtsavjcbpwxqpsr")); model = BinaryData.fromObject(model).toObject(ScopeMapInner.class); - Assertions.assertEquals("tskzbbtdzumveek", model.description()); - Assertions.assertEquals("f", model.actions().get(0)); + Assertions.assertEquals("lvqhjkbegibtnmx", model.description()); + Assertions.assertEquals("tzjuzgwyzmhtxo", model.actions().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java index aa80fccb6701..2fb86d65841b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapListResultTests.java @@ -12,10 +12,10 @@ public final class ScopeMapListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScopeMapListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"tfdygpfqb\",\"type\":\"ceopzfqrhhuaopp\",\"creationDate\":\"2021-12-04T10:32:02Z\",\"provisioningState\":\"Failed\",\"actions\":[\"ol\",\"dahzxctobg\",\"kdmoi\"]},\"id\":\"ostmgrcf\",\"name\":\"unrmfqjhhkxb\",\"type\":\"vjymjhxxjyngud\"},{\"properties\":{\"description\":\"r\",\"type\":\"wbxqzvszjfau\",\"creationDate\":\"2021-09-23T21:18:01Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"ivetvtcq\",\"qtdo\"]},\"id\":\"cbxvwvxyslqbh\",\"name\":\"fxoblytkb\",\"type\":\"mpew\"}],\"nextLink\":\"fbkrvrnsvs\"}") + "{\"value\":[{\"properties\":{\"description\":\"jyofdxluusdtto\",\"type\":\"aboekqv\",\"creationDate\":\"2021-03-07T10:01:38Z\",\"provisioningState\":\"Succeeded\",\"actions\":[\"vbxwyjsflhh\"]},\"id\":\"aln\",\"name\":\"ixisxyawjoy\",\"type\":\"qcslyjpkiid\"}],\"nextLink\":\"exznelixhnr\"}") .toObject(ScopeMapListResult.class); - Assertions.assertEquals("tfdygpfqb", model.value().get(0).description()); - Assertions.assertEquals("ol", model.value().get(0).actions().get(0)); - Assertions.assertEquals("fbkrvrnsvs", model.nextLink()); + Assertions.assertEquals("jyofdxluusdtto", model.value().get(0).description()); + Assertions.assertEquals("vbxwyjsflhh", model.value().get(0).actions().get(0)); + Assertions.assertEquals("exznelixhnr", model.nextLink()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java index 5b988818280b..2002cdaa0e3f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesTests.java @@ -13,18 +13,18 @@ public final class ScopeMapPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScopeMapProperties model = BinaryData.fromString( - "{\"description\":\"wyjsflhhcaalnjix\",\"type\":\"xyawj\",\"creationDate\":\"2021-08-07T05:01:18Z\",\"provisioningState\":\"Failed\",\"actions\":[\"lyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"]}") + "{\"description\":\"exrmcqibycnojvk\",\"type\":\"e\",\"creationDate\":\"2021-06-23T12:33:46Z\",\"provisioningState\":\"Creating\",\"actions\":[\"ah\"]}") .toObject(ScopeMapProperties.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); - Assertions.assertEquals("lyjpk", model.actions().get(0)); + Assertions.assertEquals("exrmcqibycnojvk", model.description()); + Assertions.assertEquals("ah", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapProperties model = new ScopeMapProperties().withDescription("wyjsflhhcaalnjix") - .withActions(Arrays.asList("lyjpk", "idzyexznelixhnr", "tfolhbnx")); + ScopeMapProperties model + = new ScopeMapProperties().withDescription("exrmcqibycnojvk").withActions(Arrays.asList("ah")); model = BinaryData.fromObject(model).toObject(ScopeMapProperties.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.description()); - Assertions.assertEquals("lyjpk", model.actions().get(0)); + Assertions.assertEquals("exrmcqibycnojvk", model.description()); + Assertions.assertEquals("ah", model.actions().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java index c6f719bdebde..d9103faf4881 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapPropertiesUpdateParametersTests.java @@ -12,19 +12,19 @@ public final class ScopeMapPropertiesUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScopeMapPropertiesUpdateParameters model - = BinaryData.fromString("{\"description\":\"hxg\",\"actions\":[\"mgucna\",\"kteo\"]}") - .toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("hxg", model.description()); - Assertions.assertEquals("mgucna", model.actions().get(0)); + ScopeMapPropertiesUpdateParameters model = BinaryData + .fromString("{\"description\":\"i\",\"actions\":[\"lpjzuaejxdu\",\"tskzbbtdzumveek\",\"pwo\",\"uh\"]}") + .toObject(ScopeMapPropertiesUpdateParameters.class); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("lpjzuaejxdu", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapPropertiesUpdateParameters model = new ScopeMapPropertiesUpdateParameters().withDescription("hxg") - .withActions(Arrays.asList("mgucna", "kteo")); + ScopeMapPropertiesUpdateParameters model = new ScopeMapPropertiesUpdateParameters().withDescription("i") + .withActions(Arrays.asList("lpjzuaejxdu", "tskzbbtdzumveek", "pwo", "uh")); model = BinaryData.fromObject(model).toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("hxg", model.description()); - Assertions.assertEquals("mgucna", model.actions().get(0)); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("lpjzuaejxdu", model.actions().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java index 2039e15174d7..88eb919d553d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapUpdateParametersTests.java @@ -13,18 +13,18 @@ public final class ScopeMapUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScopeMapUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"description\":\"laulppg\",\"actions\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"]}}") + "{\"properties\":{\"description\":\"y\",\"actions\":[\"vgqzcjrvxd\",\"zlmwlxkvugfhz\",\"vawjvzunlu\",\"hnnpr\"]}}") .toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("laulppg", model.description()); - Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + Assertions.assertEquals("y", model.description()); + Assertions.assertEquals("vgqzcjrvxd", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("laulppg") - .withActions(Arrays.asList("pnapnyiropuh", "igvpgylg", "git", "medjvcslynqwwncw")); + ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("y") + .withActions(Arrays.asList("vgqzcjrvxd", "zlmwlxkvugfhz", "vawjvzunlu", "hnnpr")); model = BinaryData.fromObject(model).toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("laulppg", model.description()); - Assertions.assertEquals("pnapnyiropuh", model.actions().get(0)); + Assertions.assertEquals("y", model.description()); + Assertions.assertEquals("vgqzcjrvxd", model.actions().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java index a9dadf727ac4..54b7b0091a44 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SourceTests.java @@ -11,9 +11,9 @@ public final class SourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Source model - = BinaryData.fromString("{\"addr\":\"uhhziuiefozbhdm\",\"instanceID\":\"l\"}").toObject(Source.class); - Assertions.assertEquals("uhhziuiefozbhdm", model.addr()); - Assertions.assertEquals("l", model.instanceID()); + Source model = BinaryData.fromString("{\"addr\":\"zfoqouicybxar\",\"instanceID\":\"szufoxciqopidoa\"}") + .toObject(Source.class); + Assertions.assertEquals("zfoqouicybxar", model.addr()); + Assertions.assertEquals("szufoxciqopidoa", model.instanceId()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java index 98055c8331cf..9a660d180470 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SyncUpdatePropertiesTests.java @@ -14,21 +14,21 @@ public final class SyncUpdatePropertiesTests { public void testDeserialize() throws Exception { SyncUpdateProperties model = BinaryData .fromString( - "{\"schedule\":\"svlxotogtwrup\",\"syncWindow\":\"PT119H24M20S\",\"messageTtl\":\"PT72H58M15S\"}") + "{\"schedule\":\"nyyazttbtwwrqpue\",\"syncWindow\":\"PT37H56M6S\",\"messageTtl\":\"PT69H52M39S\"}") .toObject(SyncUpdateProperties.class); - Assertions.assertEquals("svlxotogtwrup", model.schedule()); - Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.schedule()); + Assertions.assertEquals(Duration.parse("PT37H56M6S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT69H52M39S"), model.messageTtl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("svlxotogtwrup") - .withSyncWindow(Duration.parse("PT119H24M20S")) - .withMessageTtl(Duration.parse("PT72H58M15S")); + SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("nyyazttbtwwrqpue") + .withSyncWindow(Duration.parse("PT37H56M6S")) + .withMessageTtl(Duration.parse("PT69H52M39S")); model = BinaryData.fromObject(model).toObject(SyncUpdateProperties.class); - Assertions.assertEquals("svlxotogtwrup", model.schedule()); - Assertions.assertEquals(Duration.parse("PT119H24M20S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT72H58M15S"), model.messageTtl()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.schedule()); + Assertions.assertEquals(Duration.parse("PT37H56M6S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT69H52M39S"), model.messageTtl()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java index d96d1c723285..11fd350c24b5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TargetTests.java @@ -12,16 +12,16 @@ public final class TargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Target model = BinaryData.fromString( - "{\"mediaType\":\"tlmngu\",\"size\":8390359388948965260,\"digest\":\"ldsyuuximerqfob\",\"length\":8923665884777818679,\"repository\":\"bykutw\",\"url\":\"hpagm\",\"tag\":\"skdsnfdsdoakg\",\"name\":\"lmkk\",\"version\":\"vdlhewpusdsttwv\"}") + "{\"mediaType\":\"gdknnqv\",\"size\":8546326573006782142,\"digest\":\"n\",\"length\":5006272159891019182,\"repository\":\"sgsahmkycgr\",\"url\":\"wjue\",\"tag\":\"eburu\",\"name\":\"movsmzlxwabmqoe\",\"version\":\"ifrvtpu\"}") .toObject(Target.class); - Assertions.assertEquals("tlmngu", model.mediaType()); - Assertions.assertEquals(8390359388948965260L, model.size()); - Assertions.assertEquals("ldsyuuximerqfob", model.digest()); - Assertions.assertEquals(8923665884777818679L, model.length()); - Assertions.assertEquals("bykutw", model.repository()); - Assertions.assertEquals("hpagm", model.url()); - Assertions.assertEquals("skdsnfdsdoakg", model.tag()); - Assertions.assertEquals("lmkk", model.name()); - Assertions.assertEquals("vdlhewpusdsttwv", model.version()); + Assertions.assertEquals("gdknnqv", model.mediaType()); + Assertions.assertEquals(8546326573006782142L, model.size()); + Assertions.assertEquals("n", model.digest()); + Assertions.assertEquals(5006272159891019182L, model.length()); + Assertions.assertEquals("sgsahmkycgr", model.repository()); + Assertions.assertEquals("wjue", model.url()); + Assertions.assertEquals("eburu", model.tag()); + Assertions.assertEquals("movsmzlxwabmqoe", model.name()); + Assertions.assertEquals("ifrvtpu", model.version()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java index b27a8b59bdea..19cb5d95c87e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsCertificatePropertiesTests.java @@ -10,7 +10,7 @@ public final class TlsCertificatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TlsCertificateProperties model = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"b\"}") + TlsCertificateProperties model = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"vtq\"}") .toObject(TlsCertificateProperties.class); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java index a39957ac7ce4..5f729f7d7ea0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/TlsPropertiesTests.java @@ -12,7 +12,7 @@ public final class TlsPropertiesTests { public void testDeserialize() throws Exception { TlsProperties model = BinaryData .fromString( - "{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"gnxytxhpzxbz\"}}") + "{\"status\":\"Disabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"bnuqqkpik\"}}") .toObject(TlsProperties.class); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java index 260d2dae1119..0a25a2981246 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookCreateParametersTests.java @@ -17,36 +17,35 @@ public final class WebhookCreateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookCreateParameters model = BinaryData.fromString( - "{\"tags\":{\"bpodxunkbebxm\":\"kzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\",\"xe\":\"p\"},\"location\":\"mnzb\",\"properties\":{\"serviceUri\":\"hjpglkf\",\"customHeaders\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"status\":\"enabled\",\"scope\":\"cffgdkzzewk\",\"actions\":[\"push\",\"quarantine\"]}}") + "{\"tags\":{\"r\":\"aruoujmkcjhwqyt\",\"ewgdrjervn\":\"bnw\",\"eh\":\"enq\"},\"location\":\"ndoygmifthnzdnd\",\"properties\":{\"serviceUri\":\"gnayqigynduh\",\"customHeaders\":{\"maqolbgycduie\":\"qlkth\",\"qlfmmdnbb\":\"tgccymvaolpss\",\"wyhzdx\":\"lzpswiydm\"},\"status\":\"disabled\",\"scope\":\"bzmnvdfznud\",\"actions\":[\"delete\"]}}") .toObject(WebhookCreateParameters.class); - Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); - Assertions.assertEquals("mnzb", model.location()); - Assertions.assertEquals("hjpglkf", model.serviceUri()); - Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("cffgdkzzewk", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("aruoujmkcjhwqyt", model.tags().get("r")); + Assertions.assertEquals("ndoygmifthnzdnd", model.location()); + Assertions.assertEquals("gnayqigynduh", model.serviceUri()); + Assertions.assertEquals("qlkth", model.customHeaders().get("maqolbgycduie")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bzmnvdfznud", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookCreateParameters model = new WebhookCreateParameters() - .withTags(mapOf("bpodxunkbebxm", "kzgxhurip", "oievseotgqrlltm", "byyntwlrbqt", "jefuzmuvpbttdumo", - "wlauwzizxbmpg", "xe", "p")) - .withLocation("mnzb") - .withServiceUri("hjpglkf") - .withCustomHeaders(mapOf("lfphsdyhtozfikd", "dneu", "zonosgg", "wwquuvxzxclvithh", "ljuti", "hcohfwdsjnk")) - .withStatus(WebhookStatus.ENABLED) - .withScope("cffgdkzzewk") - .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.QUARANTINE)); + WebhookCreateParameters model + = new WebhookCreateParameters().withTags(mapOf("r", "aruoujmkcjhwqyt", "ewgdrjervn", "bnw", "eh", "enq")) + .withLocation("ndoygmifthnzdnd") + .withServiceUri("gnayqigynduh") + .withCustomHeaders(mapOf("maqolbgycduie", "qlkth", "qlfmmdnbb", "tgccymvaolpss", "wyhzdx", "lzpswiydm")) + .withStatus(WebhookStatus.DISABLED) + .withScope("bzmnvdfznud") + .withActions(Arrays.asList(WebhookAction.DELETE)); model = BinaryData.fromObject(model).toObject(WebhookCreateParameters.class); - Assertions.assertEquals("kzgxhurip", model.tags().get("bpodxunkbebxm")); - Assertions.assertEquals("mnzb", model.location()); - Assertions.assertEquals("hjpglkf", model.serviceUri()); - Assertions.assertEquals("dneu", model.customHeaders().get("lfphsdyhtozfikd")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("cffgdkzzewk", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("aruoujmkcjhwqyt", model.tags().get("r")); + Assertions.assertEquals("ndoygmifthnzdnd", model.location()); + Assertions.assertEquals("gnayqigynduh", model.serviceUri()); + Assertions.assertEquals("qlkth", model.customHeaders().get("maqolbgycduie")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("bzmnvdfznud", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); } // Use "Map.of" if available diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java index a122fd3b24be..cbbb10b47c76 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookInnerTests.java @@ -17,30 +17,28 @@ public final class WebhookInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookInner model = BinaryData.fromString( - "{\"properties\":{\"status\":\"disabled\",\"scope\":\"fznudaodvxzb\",\"actions\":[\"chart_push\",\"delete\",\"chart_push\",\"push\"],\"provisioningState\":\"Canceled\"},\"location\":\"dbh\",\"tags\":{\"evfiwjmygt\":\"rzdzucerscdnt\",\"pyqs\":\"sslswtmweriof\",\"vwiwubmwmbesld\":\"mwabnetshhszhedp\",\"wtppjflcxogaoko\":\"k\"},\"id\":\"z\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}") + "{\"properties\":{\"status\":\"enabled\",\"scope\":\"lmpewwwfbkr\",\"actions\":[\"push\"],\"provisioningState\":\"Deleting\"},\"location\":\"hqjohxcrsbfova\",\"tags\":{\"bcgjbirxbp\":\"uvwbhsqfs\"},\"id\":\"bsrfbj\",\"name\":\"dtws\",\"type\":\"otftpvjzbexilz\"}") .toObject(WebhookInner.class); - Assertions.assertEquals("dbh", model.location()); - Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("fznudaodvxzb", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("hqjohxcrsbfova", model.location()); + Assertions.assertEquals("uvwbhsqfs", model.tags().get("bcgjbirxbp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("lmpewwwfbkr", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookInner model = new WebhookInner().withLocation("dbh") - .withTags(mapOf("evfiwjmygt", "rzdzucerscdnt", "pyqs", "sslswtmweriof", "vwiwubmwmbesld", - "mwabnetshhszhedp", "wtppjflcxogaoko", "k")) - .withStatus(WebhookStatus.DISABLED) - .withScope("fznudaodvxzb") - .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.DELETE, WebhookAction.CHART_PUSH, - WebhookAction.PUSH)); + WebhookInner model = new WebhookInner().withLocation("hqjohxcrsbfova") + .withTags(mapOf("bcgjbirxbp", "uvwbhsqfs")) + .withStatus(WebhookStatus.ENABLED) + .withScope("lmpewwwfbkr") + .withActions(Arrays.asList(WebhookAction.PUSH)); model = BinaryData.fromObject(model).toObject(WebhookInner.class); - Assertions.assertEquals("dbh", model.location()); - Assertions.assertEquals("rzdzucerscdnt", model.tags().get("evfiwjmygt")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("fznudaodvxzb", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("hqjohxcrsbfova", model.location()); + Assertions.assertEquals("uvwbhsqfs", model.tags().get("bcgjbirxbp")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("lmpewwwfbkr", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); } // Use "Map.of" if available diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java index 933d8c6bcb94..04e2e96ebced 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookListResultTests.java @@ -14,13 +14,13 @@ public final class WebhookListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"status\":\"disabled\",\"scope\":\"rjxgciqib\",\"actions\":[\"push\"],\"provisioningState\":\"Failed\"},\"location\":\"dqrhzoymib\",\"tags\":{\"wfluszdt\":\"yiba\"},\"id\":\"hrkwo\",\"name\":\"yyv\",\"type\":\"qacpiex\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"wbwo\",\"actions\":[\"push\",\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"tdtkcn\",\"tags\":{\"i\":\"bpokulpiujwaasip\",\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\",\"h\":\"koymkcd\"},\"id\":\"pkkpw\",\"name\":\"reqnovvqfov\",\"type\":\"jxywsuws\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"sytgadgvraea\",\"actions\":[\"quarantine\"],\"provisioningState\":\"Deleting\"},\"location\":\"arrwlquu\",\"tags\":{\"fpubjibwwi\":\"qkacewii\"},\"id\":\"tohqkvpuvksgp\",\"name\":\"saknynfsyn\",\"type\":\"jphuopxodlqi\"}],\"nextLink\":\"torzih\"}") + "{\"value\":[{\"properties\":{\"status\":\"enabled\",\"scope\":\"lkfg\",\"actions\":[\"push\",\"chart_delete\",\"chart_delete\"],\"provisioningState\":\"Failed\"},\"location\":\"fphsdyhtozfikdow\",\"tags\":{\"hhqzonosgg\":\"uvxzxclvi\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"dlxyjrxs\",\"actions\":[\"chart_push\",\"quarantine\",\"quarantine\",\"chart_delete\"],\"provisioningState\":\"Creating\"},\"location\":\"wqapnedgfbcvk\",\"tags\":{\"qdcvdrhvoo\":\"vpk\"},\"id\":\"sotbob\",\"name\":\"dopcjwvnh\",\"type\":\"ld\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"xrslpm\",\"actions\":[\"quarantine\",\"quarantine\",\"quarantine\",\"chart_delete\"],\"provisioningState\":\"Failed\"},\"location\":\"khjwn\",\"tags\":{\"vmbmp\":\"sluicpdggkzz\",\"uefywsbpfvmwy\":\"xmodf\"},\"id\":\"rfouyftaakcpw\",\"name\":\"yzvqt\",\"type\":\"nubexk\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"ondjmq\",\"actions\":[\"quarantine\"],\"provisioningState\":\"Failed\"},\"location\":\"mg\",\"tags\":{\"gxysmocmbqfqvm\":\"kwhojvpaj\",\"glyatddckcbcuej\":\"cxozapvhelxp\",\"sxsdqrhzoymibm\":\"jxgciqibrh\"},\"id\":\"qyib\",\"name\":\"hwflu\",\"type\":\"zdtmhrkwofy\"}],\"nextLink\":\"oqac\"}") .toObject(WebhookListResult.class); - Assertions.assertEquals("dqrhzoymib", model.value().get(0).location()); - Assertions.assertEquals("yiba", model.value().get(0).tags().get("wfluszdt")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.value().get(0).status()); - Assertions.assertEquals("rjxgciqib", model.value().get(0).scope()); + Assertions.assertEquals("fphsdyhtozfikdow", model.value().get(0).location()); + Assertions.assertEquals("uvxzxclvi", model.value().get(0).tags().get("hhqzonosgg")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.value().get(0).status()); + Assertions.assertEquals("lkfg", model.value().get(0).scope()); Assertions.assertEquals(WebhookAction.PUSH, model.value().get(0).actions().get(0)); - Assertions.assertEquals("torzih", model.nextLink()); + Assertions.assertEquals("oqac", model.nextLink()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java index 6ae865d09ad9..05f9f7bd068d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesCreateParametersTests.java @@ -17,27 +17,29 @@ public final class WebhookPropertiesCreateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPropertiesCreateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"crailvpn\",\"customHeaders\":{\"hdlxyjrxsagafcn\":\"uflrwd\",\"apnedgfbcvkc\":\"hgw\",\"pkeqdcvdrhvoo\":\"q\"},\"status\":\"disabled\",\"scope\":\"bobzdopcjwvnhd\",\"actions\":[\"chart_delete\"]}") + "{\"serviceUri\":\"vxzbncb\",\"customHeaders\":{\"ucerscdntnevfi\":\"pstdbhhxsrzd\",\"ofz\":\"jmygtdsslswtmwer\",\"n\":\"yqsemwa\",\"vwiwubmwmbesld\":\"tshhszhedp\"},\"status\":\"enabled\",\"scope\":\"tppjflcx\",\"actions\":[\"chart_delete\",\"chart_push\",\"push\",\"quarantine\"]}") .toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("crailvpn", model.serviceUri()); - Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals("vxzbncb", model.serviceUri()); + Assertions.assertEquals("pstdbhhxsrzd", model.customHeaders().get("ucerscdntnevfi")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("tppjflcx", model.scope()); Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("crailvpn") - .withCustomHeaders(mapOf("hdlxyjrxsagafcn", "uflrwd", "apnedgfbcvkc", "hgw", "pkeqdcvdrhvoo", "q")) - .withStatus(WebhookStatus.DISABLED) - .withScope("bobzdopcjwvnhd") - .withActions(Arrays.asList(WebhookAction.CHART_DELETE)); + WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("vxzbncb") + .withCustomHeaders(mapOf("ucerscdntnevfi", "pstdbhhxsrzd", "ofz", "jmygtdsslswtmwer", "n", "yqsemwa", + "vwiwubmwmbesld", "tshhszhedp")) + .withStatus(WebhookStatus.ENABLED) + .withScope("tppjflcx") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE, WebhookAction.CHART_PUSH, WebhookAction.PUSH, + WebhookAction.QUARANTINE)); model = BinaryData.fromObject(model).toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("crailvpn", model.serviceUri()); - Assertions.assertEquals("uflrwd", model.customHeaders().get("hdlxyjrxsagafcn")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("bobzdopcjwvnhd", model.scope()); + Assertions.assertEquals("vxzbncb", model.serviceUri()); + Assertions.assertEquals("pstdbhhxsrzd", model.customHeaders().get("ucerscdntnevfi")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("tppjflcx", model.scope()); Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java index 8c9bd3ab0741..32595fea7dfe 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java @@ -15,22 +15,21 @@ public final class WebhookPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookProperties model = BinaryData.fromString( - "{\"status\":\"disabled\",\"scope\":\"gxtibqdxbxw\",\"actions\":[\"delete\",\"chart_delete\",\"delete\",\"delete\"],\"provisioningState\":\"Canceled\"}") + "{\"status\":\"disabled\",\"scope\":\"q\",\"actions\":[\"chart_push\"],\"provisioningState\":\"Updating\"}") .toObject(WebhookProperties.class); Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("gxtibqdxbxw", model.scope()); - Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); + Assertions.assertEquals("q", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WebhookProperties model = new WebhookProperties().withStatus(WebhookStatus.DISABLED) - .withScope("gxtibqdxbxw") - .withActions(Arrays.asList(WebhookAction.DELETE, WebhookAction.CHART_DELETE, WebhookAction.DELETE, - WebhookAction.DELETE)); + .withScope("q") + .withActions(Arrays.asList(WebhookAction.CHART_PUSH)); model = BinaryData.fromObject(model).toObject(WebhookProperties.class); Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("gxtibqdxbxw", model.scope()); - Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); + Assertions.assertEquals("q", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java index 081dded2d80b..207650cdde78 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesUpdateParametersTests.java @@ -17,28 +17,30 @@ public final class WebhookPropertiesUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPropertiesUpdateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"iyzvqtmnub\",\"customHeaders\":{\"mond\":\"pzk\",\"gkopkwhojvpajqgx\":\"mquxvypo\",\"qvmkcxo\":\"smocmbq\"},\"status\":\"disabled\",\"scope\":\"helxprglya\",\"actions\":[\"chart_push\",\"push\"]}") + "{\"serviceUri\":\"uriplbpodxunkb\",\"customHeaders\":{\"lrb\":\"mubyynt\",\"l\":\"tkoievseotgq\",\"xbmp\":\"tmuwlauwzi\",\"pbttdum\":\"cjefuzmu\"},\"status\":\"enabled\",\"scope\":\"xe\",\"actions\":[\"push\",\"push\"]}") .toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); - Assertions.assertEquals("pzk", model.customHeaders().get("mond")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("helxprglya", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("uriplbpodxunkb", model.serviceUri()); + Assertions.assertEquals("mubyynt", model.customHeaders().get("lrb")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("xe", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("iyzvqtmnub") - .withCustomHeaders(mapOf("mond", "pzk", "gkopkwhojvpajqgx", "mquxvypo", "qvmkcxo", "smocmbq")) - .withStatus(WebhookStatus.DISABLED) - .withScope("helxprglya") - .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.PUSH)); + WebhookPropertiesUpdateParameters model + = new WebhookPropertiesUpdateParameters().withServiceUri("uriplbpodxunkb") + .withCustomHeaders( + mapOf("lrb", "mubyynt", "l", "tkoievseotgq", "xbmp", "tmuwlauwzi", "pbttdum", "cjefuzmu")) + .withStatus(WebhookStatus.ENABLED) + .withScope("xe") + .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.PUSH)); model = BinaryData.fromObject(model).toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("iyzvqtmnub", model.serviceUri()); - Assertions.assertEquals("pzk", model.customHeaders().get("mond")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("helxprglya", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("uriplbpodxunkb", model.serviceUri()); + Assertions.assertEquals("mubyynt", model.customHeaders().get("lrb")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("xe", model.scope()); + Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); } // Use "Map.of" if available diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java index e8ee5aa041b1..f5a3137ebb61 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java @@ -17,31 +17,32 @@ public final class WebhookUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"mutwuoe\":\"xcxrsl\"},\"properties\":{\"serviceUri\":\"khjwn\",\"customHeaders\":{\"vmbmp\":\"sluicpdggkzz\",\"uefywsbpfvmwy\":\"xmodf\"},\"status\":\"enabled\",\"scope\":\"uyfta\",\"actions\":[\"quarantine\"]}}") + "{\"tags\":{\"sikvmkqzeqqkdlt\":\"m\"},\"properties\":{\"serviceUri\":\"mhhv\",\"customHeaders\":{\"odkwobd\":\"r\"},\"status\":\"disabled\",\"scope\":\"ibqdxbxwakbogqx\",\"actions\":[\"chart_delete\",\"push\",\"chart_delete\",\"push\"]}}") .toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); - Assertions.assertEquals("khjwn", model.serviceUri()); - Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("uyfta", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + Assertions.assertEquals("m", model.tags().get("sikvmkqzeqqkdlt")); + Assertions.assertEquals("mhhv", model.serviceUri()); + Assertions.assertEquals("r", model.customHeaders().get("odkwobd")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("ibqdxbxwakbogqx", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookUpdateParameters model = new WebhookUpdateParameters().withTags(mapOf("mutwuoe", "xcxrsl")) - .withServiceUri("khjwn") - .withCustomHeaders(mapOf("vmbmp", "sluicpdggkzz", "uefywsbpfvmwy", "xmodf")) - .withStatus(WebhookStatus.ENABLED) - .withScope("uyfta") - .withActions(Arrays.asList(WebhookAction.QUARANTINE)); + WebhookUpdateParameters model = new WebhookUpdateParameters().withTags(mapOf("sikvmkqzeqqkdlt", "m")) + .withServiceUri("mhhv") + .withCustomHeaders(mapOf("odkwobd", "r")) + .withStatus(WebhookStatus.DISABLED) + .withScope("ibqdxbxwakbogqx") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE, WebhookAction.PUSH, WebhookAction.CHART_DELETE, + WebhookAction.PUSH)); model = BinaryData.fromObject(model).toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("xcxrsl", model.tags().get("mutwuoe")); - Assertions.assertEquals("khjwn", model.serviceUri()); - Assertions.assertEquals("sluicpdggkzz", model.customHeaders().get("vmbmp")); - Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("uyfta", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + Assertions.assertEquals("m", model.tags().get("sikvmkqzeqqkdlt")); + Assertions.assertEquals("mhhv", model.serviceUri()); + Assertions.assertEquals("r", model.customHeaders().get("odkwobd")); + Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); + Assertions.assertEquals("ibqdxbxwakbogqx", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); } // Use "Map.of" if available diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml index ce91de989f03..5ac3911ba27b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry -commit: 149c9171215a4b036b34347dd855df2add0a216d +commit: 7475af38d5e4db21f92dd36fedd4f544fa079ae9 repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: From eae0538f480f751806e3110440fdf2e48fdfb6a6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 16:36:49 +0800 Subject: [PATCH 12/16] regen again --- .../models/RegistryNameCheckRequest.java | 20 +------- .../RegistryOperationsTests.java | 1 - .../generated/ActorTests.java | 4 +- .../generated/CallbackConfigInnerTests.java | 6 +-- .../generated/EventContentTests.java | 42 ++++++++-------- .../generated/EventInfoInnerTests.java | 4 +- .../generated/EventRequestMessageTests.java | 50 +++++++++---------- .../GarbageCollectionPropertiesTests.java | 13 +++-- .../generated/LoggingPropertiesTests.java | 8 +-- .../generated/LoginServerPropertiesTests.java | 2 +- ...vateEndpointConnectionListResultTests.java | 11 ++-- .../PrivateLinkResourceInnerTests.java | 4 +- .../PrivateLinkResourceListResultTests.java | 6 +-- .../PrivateLinkResourcePropertiesTests.java | 7 ++- .../RegistryNameCheckRequestTests.java | 6 +-- .../RegistryNameStatusInnerTests.java | 12 ++--- .../generated/ReplicationInnerTests.java | 27 +++++----- .../generated/ReplicationListResultTests.java | 10 ++-- .../generated/ReplicationPropertiesTests.java | 8 +-- ...cationUpdateParametersPropertiesTests.java | 8 +-- .../ReplicationUpdateParametersTests.java | 13 ++--- .../generated/RequestTests.java | 15 +++--- .../generated/ScopeMapInnerTests.java | 14 +++--- .../generated/ScopeMapListResultTests.java | 8 +-- .../generated/ScopeMapPropertiesTests.java | 14 +++--- ...opeMapPropertiesUpdateParametersTests.java | 15 +++--- .../ScopeMapUpdateParametersTests.java | 18 +++---- .../generated/SourceTests.java | 6 +-- .../generated/SyncUpdatePropertiesTests.java | 20 ++++---- .../generated/TargetTests.java | 20 ++++---- .../TlsCertificatePropertiesTests.java | 5 +- .../generated/TlsPropertiesTests.java | 5 +- .../WebhookCreateParametersTests.java | 45 +++++++++-------- .../generated/WebhookInnerTests.java | 28 ++++++----- .../generated/WebhookListResultTests.java | 12 ++--- ...ebhookPropertiesCreateParametersTests.java | 29 ++++++----- .../generated/WebhookPropertiesTests.java | 14 +++--- ...ebhookPropertiesUpdateParametersTests.java | 34 ++++++------- .../WebhookUpdateParametersTests.java | 34 ++++++------- .../tsp-location.yaml | 2 +- 40 files changed, 290 insertions(+), 310 deletions(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java index c6720702b3d4..ee66f7601c28 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryNameCheckRequest.java @@ -25,7 +25,7 @@ public final class RegistryNameCheckRequest implements JsonSerializable Date: Fri, 23 Jan 2026 09:20:15 +0000 Subject: [PATCH 13/16] Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2025-11-01, SDK Release Type: stable, and CommitSHA: '6d00d74a16a7305aa9064fc5a534167cc2fbe0a2' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5789665 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 62 ++++++++----------- .../tsp-location.yaml | 4 +- ...egistriesCheckNameAvailabilitySamples.java | 9 +-- 3 files changed, 29 insertions(+), 46 deletions(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 017984f3cc6e..fccf658b00f7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -35,10 +35,10 @@ * `OperationMetricSpecificationDefinition()` was changed to private access * `withInternalMetricName(java.lang.String)` was removed * `withName(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed -* `withDisplayDescription(java.lang.String)` was removed * `withAggregationType(java.lang.String)` was removed * `withUnit(java.lang.String)` was removed +* `withDisplayDescription(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed #### `models.TlsProperties` was modified @@ -47,8 +47,8 @@ #### `models.RegistryPassword` was modified * `RegistryPassword()` was changed to private access -* `withValue(java.lang.String)` was removed * `withName(models.PasswordName)` was removed +* `withValue(java.lang.String)` was removed #### `models.TlsCertificateProperties` was modified @@ -57,15 +57,15 @@ #### `models.Target` was modified * `Target()` was changed to private access -* `withUrl(java.lang.String)` was removed * `withLength(java.lang.Long)` was removed -* `withTag(java.lang.String)` was removed -* `withVersion(java.lang.String)` was removed * `withMediaType(java.lang.String)` was removed +* `withSize(java.lang.Long)` was removed * `withRepository(java.lang.String)` was removed -* `withName(java.lang.String)` was removed * `withDigest(java.lang.String)` was removed -* `withSize(java.lang.Long)` was removed +* `withUrl(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withTag(java.lang.String)` was removed +* `withName(java.lang.String)` was removed #### `models.StatusDetailProperties` was modified @@ -78,8 +78,8 @@ #### `models.OperationServiceSpecificationDefinition` was modified * `OperationServiceSpecificationDefinition()` was changed to private access -* `withLogSpecifications(java.util.List)` was removed * `withMetricSpecifications(java.util.List)` was removed +* `withLogSpecifications(java.util.List)` was removed #### `models.Actor` was modified @@ -89,17 +89,15 @@ #### `models.Source` was modified * `Source()` was changed to private access -* `withAddr(java.lang.String)` was removed -* `instanceId()` was removed * `withInstanceId(java.lang.String)` was removed +* `withAddr(java.lang.String)` was removed #### `models.RegistryNameCheckRequest` was modified * `autoGeneratedDomainNameLabelScope()` was removed -* `java.lang.String type()` -> `models.ContainerRegistryResourceType type()` * `withAutoGeneratedDomainNameLabelScope(models.AutoGeneratedDomainNameLabelScope)` was removed -* `resourceGroupName()` was removed * `withResourceGroupName(java.lang.String)` was removed +* `resourceGroupName()` was removed #### `models.RegistryUsage` was modified @@ -112,30 +110,30 @@ #### `models.EventResponseMessage` was modified * `EventResponseMessage()` was changed to private access -* `withVersion(java.lang.String)` was removed -* `withContent(java.lang.String)` was removed +* `withStatusCode(java.lang.String)` was removed * `withHeaders(java.util.Map)` was removed +* `withContent(java.lang.String)` was removed * `withReasonPhrase(java.lang.String)` was removed -* `withStatusCode(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed #### `models.EventContent` was modified * `EventContent()` was changed to private access -* `withRequest(models.Request)` was removed +* `withId(java.lang.String)` was removed * `withTarget(models.Target)` was removed +* `withTimestamp(java.time.OffsetDateTime)` was removed +* `withActor(models.Actor)` was removed * `withSource(models.Source)` was removed * `withAction(java.lang.String)` was removed -* `withActor(models.Actor)` was removed -* `withTimestamp(java.time.OffsetDateTime)` was removed -* `withId(java.lang.String)` was removed +* `withRequest(models.Request)` was removed #### `models.OperationDisplayDefinition` was modified * `OperationDisplayDefinition()` was changed to private access -* `withProvider(java.lang.String)` was removed -* `withResource(java.lang.String)` was removed * `withDescription(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed * `withOperation(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed #### `models.ActivationProperties` was modified @@ -144,11 +142,11 @@ #### `models.EventRequestMessage` was modified * `EventRequestMessage()` was changed to private access -* `withMethod(java.lang.String)` was removed * `withVersion(java.lang.String)` was removed -* `withHeaders(java.util.Map)` was removed +* `withMethod(java.lang.String)` was removed * `withRequestUri(java.lang.String)` was removed * `withContent(models.EventContent)` was removed +* `withHeaders(java.util.Map)` was removed #### `models.CredentialHealth` was modified @@ -160,31 +158,21 @@ #### `models.OperationLogSpecificationDefinition` was modified * `OperationLogSpecificationDefinition()` was changed to private access +* `withDisplayName(java.lang.String)` was removed * `withName(java.lang.String)` was removed * `withBlobDuration(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed #### `models.Request` was modified * `Request()` was changed to private access -* `withId(java.lang.String)` was removed * `withHost(java.lang.String)` was removed +* `withMethod(java.lang.String)` was removed * `withAddr(java.lang.String)` was removed * `withUseragent(java.lang.String)` was removed -* `withMethod(java.lang.String)` was removed +* `withId(java.lang.String)` was removed ### Features Added -* `models.ContainerRegistryResourceType` was added - -#### `models.Source` was modified - -* `instanceID()` was added - -#### `models.RegistryNameCheckRequest` was modified - -* `withType(models.ContainerRegistryResourceType)` was added - #### `ContainerRegistryManager` was modified * `taskClient()` was added diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml index 7ac3a0d92631..f9da72965ed3 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry -commit: 2406ef33e6eb9a4819f83adbbb9b1f4e42357506 +commit: 6d00d74a16a7305aa9064fc5a534167cc2fbe0a2 repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java index f57f0f02b156..134d9d56b13b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.containerregistry.generated; -import com.azure.resourcemanager.containerregistry.models.ContainerRegistryResourceType; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; /** @@ -24,9 +23,7 @@ public static void registryCheckNameAvailable(com.azure.resourcemanager.AzureRes .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), com.azure.core.util.Context.NONE); } @@ -43,9 +40,7 @@ public static void registryCheckNameNotAvailable(com.azure.resourcemanager.Azure .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse( - new RegistryNameCheckRequest().withName("myRegistry") - .withType(ContainerRegistryResourceType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES), + .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), com.azure.core.util.Context.NONE); } } From f26796bb067c5a700d0ace8b8f5e85950509bd04 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 23 Jan 2026 17:32:40 +0800 Subject: [PATCH 14/16] update changelog --- .../CHANGELOG.md | 178 +----------------- 1 file changed, 10 insertions(+), 168 deletions(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index fccf658b00f7..24a72b711045 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -4,178 +4,20 @@ ### Breaking Changes -#### `models.OperationListResult` was removed +- Removed `resourceGroupName` and `autoGeneratedDomainNameLabelScope` from `RegistryNameCheckRequest` class. These APIs do not exist in api-version 2025-11-01. -#### `models.TokenListResult` was removed +#### Changes to `ContainerRegistryManagementClient` Class -#### `models.ConnectedRegistryListResult` was removed +- Moved `ContainerRegistryManager.serviceClient().getAgentPools()` to `ContainerRegistryManager.taskClient().getAgentPools()`. +- Moved `ContainerRegistryManager.serviceClient().getRuns()` to `ContainerRegistryManager.taskClient().getRuns()`. +- Moved `ContainerRegistryManager.serviceClient().getTaskRuns()` to `ContainerRegistryManager.taskClient().getTaskRuns()`. +- Moved `ContainerRegistryManager.serviceClient().getTasks()` to `ContainerRegistryManager.taskClient().getTasks()`. +- Moved `ContainerRegistryManager.serviceClient().getRegistries().scheduleRun(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().scheduleRun(...)`. +- Moved `ContainerRegistryManager.serviceClient().getRegistries().getBuildSourceUploadUrl(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().getBuildSourceUploadUrl(...)`. -#### `models.ReplicationListResult` was removed - -#### `models.RegistryListResult` was removed - -#### `models.CredentialSetListResult` was removed - -#### `models.PrivateEndpointConnectionListResult` was removed - -#### `models.EventListResult` was removed - -#### `models.AutoGeneratedDomainNameLabelScope` was removed - -#### `models.ScopeMapListResult` was removed - -#### `models.WebhookListResult` was removed - -#### `models.PrivateLinkResourceListResult` was removed - -#### `models.CacheRulesListResult` was removed - -#### `models.OperationMetricSpecificationDefinition` was modified - -* `OperationMetricSpecificationDefinition()` was changed to private access -* `withInternalMetricName(java.lang.String)` was removed -* `withName(java.lang.String)` was removed -* `withAggregationType(java.lang.String)` was removed -* `withUnit(java.lang.String)` was removed -* `withDisplayDescription(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed - -#### `models.TlsProperties` was modified - -* `TlsProperties()` was changed to private access - -#### `models.RegistryPassword` was modified - -* `RegistryPassword()` was changed to private access -* `withName(models.PasswordName)` was removed -* `withValue(java.lang.String)` was removed - -#### `models.TlsCertificateProperties` was modified - -* `TlsCertificateProperties()` was changed to private access - -#### `models.Target` was modified - -* `Target()` was changed to private access -* `withLength(java.lang.Long)` was removed -* `withMediaType(java.lang.String)` was removed -* `withSize(java.lang.Long)` was removed -* `withRepository(java.lang.String)` was removed -* `withDigest(java.lang.String)` was removed -* `withUrl(java.lang.String)` was removed -* `withVersion(java.lang.String)` was removed -* `withTag(java.lang.String)` was removed -* `withName(java.lang.String)` was removed - -#### `models.StatusDetailProperties` was modified - -* `StatusDetailProperties()` was changed to private access - -#### `models.Status` was modified - -* `Status()` was changed to private access - -#### `models.OperationServiceSpecificationDefinition` was modified - -* `OperationServiceSpecificationDefinition()` was changed to private access -* `withMetricSpecifications(java.util.List)` was removed -* `withLogSpecifications(java.util.List)` was removed - -#### `models.Actor` was modified - -* `Actor()` was changed to private access -* `withName(java.lang.String)` was removed - -#### `models.Source` was modified - -* `Source()` was changed to private access -* `withInstanceId(java.lang.String)` was removed -* `withAddr(java.lang.String)` was removed - -#### `models.RegistryNameCheckRequest` was modified - -* `autoGeneratedDomainNameLabelScope()` was removed -* `withAutoGeneratedDomainNameLabelScope(models.AutoGeneratedDomainNameLabelScope)` was removed -* `withResourceGroupName(java.lang.String)` was removed -* `resourceGroupName()` was removed - -#### `models.RegistryUsage` was modified - -* `RegistryUsage()` was changed to private access -* `withLimit(java.lang.Long)` was removed -* `withName(java.lang.String)` was removed -* `withUnit(models.RegistryUsageUnit)` was removed -* `withCurrentValue(java.lang.Long)` was removed - -#### `models.EventResponseMessage` was modified - -* `EventResponseMessage()` was changed to private access -* `withStatusCode(java.lang.String)` was removed -* `withHeaders(java.util.Map)` was removed -* `withContent(java.lang.String)` was removed -* `withReasonPhrase(java.lang.String)` was removed -* `withVersion(java.lang.String)` was removed - -#### `models.EventContent` was modified - -* `EventContent()` was changed to private access -* `withId(java.lang.String)` was removed -* `withTarget(models.Target)` was removed -* `withTimestamp(java.time.OffsetDateTime)` was removed -* `withActor(models.Actor)` was removed -* `withSource(models.Source)` was removed -* `withAction(java.lang.String)` was removed -* `withRequest(models.Request)` was removed - -#### `models.OperationDisplayDefinition` was modified - -* `OperationDisplayDefinition()` was changed to private access -* `withDescription(java.lang.String)` was removed -* `withResource(java.lang.String)` was removed -* `withOperation(java.lang.String)` was removed -* `withProvider(java.lang.String)` was removed - -#### `models.ActivationProperties` was modified - -* `ActivationProperties()` was changed to private access - -#### `models.EventRequestMessage` was modified - -* `EventRequestMessage()` was changed to private access -* `withVersion(java.lang.String)` was removed -* `withMethod(java.lang.String)` was removed -* `withRequestUri(java.lang.String)` was removed -* `withContent(models.EventContent)` was removed -* `withHeaders(java.util.Map)` was removed - -#### `models.CredentialHealth` was modified - -* `CredentialHealth()` was changed to private access -* `withErrorMessage(java.lang.String)` was removed -* `withStatus(models.CredentialHealthStatus)` was removed -* `withErrorCode(java.lang.String)` was removed - -#### `models.OperationLogSpecificationDefinition` was modified - -* `OperationLogSpecificationDefinition()` was changed to private access -* `withDisplayName(java.lang.String)` was removed -* `withName(java.lang.String)` was removed -* `withBlobDuration(java.lang.String)` was removed - -#### `models.Request` was modified - -* `Request()` was changed to private access -* `withHost(java.lang.String)` was removed -* `withMethod(java.lang.String)` was removed -* `withAddr(java.lang.String)` was removed -* `withUseragent(java.lang.String)` was removed -* `withId(java.lang.String)` was removed - -### Features Added - -#### `ContainerRegistryManager` was modified +### Other Changes -* `taskClient()` was added +- Registry Tasks related feature is deprecated in this library. Please use "azure-resourcemanager-containerregistry-tasks" library. ## 2.55.0-beta.1 (2025-12-04) From 3e706f8d56d03531ae12654ecbfb0fa5f0ce45cd Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 27 Jan 2026 17:15:19 +0800 Subject: [PATCH 15/16] Update sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../containerregistry/RegistryOperationsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java index 9654a2adab8c..39f16319356e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryOperationsTests.java @@ -33,7 +33,7 @@ public void canCreateContainerRegisterWithZoneRedundancy() { } @Test - public void canCreateContainerRegisterWithWebhook() { + public void canCreateContainerRegistryWithWebhook() { final String acrName = generateRandomResourceName("acr", 10); Registry registry = registryManager.containerRegistries() .define(acrName) From 77fa57cabac4af5209daae5cb33d28c180be5fff Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 27 Jan 2026 17:18:39 +0800 Subject: [PATCH 16/16] update recording --- .../azure-resourcemanager-containerregistry/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json index 5033f610ceb1..a9a0bd2abfd7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/containerregistry/azure-resourcemanager-containerregistry", - "Tag": "java/containerregistry/azure-resourcemanager-containerregistry_9b187e0299" + "Tag": "java/containerregistry/azure-resourcemanager-containerregistry_7c6728f1f3" }