From dc5d48d09482e7f4c8a9e998d173dcef62e02671 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 23 Feb 2026 18:43:34 +0000 Subject: [PATCH] Configurations: 'specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '8b8076693baafd8d4ebeaca903bdaa0c191766b9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5912574 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 240 +++- .../fluent/ArchiveVersionsClient.java | 391 ++++++ .../fluent/ArchivesClient.java | 436 ++++++ .../fluent/ConnectedRegistriesClient.java | 62 + .../ContainerRegistryManagementClient.java | 35 + .../fluent/ExportPipelinesClient.java | 349 +++++ .../fluent/ImportPipelinesClient.java | 349 +++++ .../fluent/PipelineRunsClient.java | 345 +++++ .../fluent/models/ArchiveInner.java | 243 ++++ .../fluent/models/ArchiveProperties.java | 186 +++ .../models/ArchiveUpdateProperties.java | 93 ++ .../fluent/models/ArchiveVersionInner.java | 174 +++ .../models/ArchiveVersionProperties.java | 101 ++ .../fluent/models/CacheRuleInner.java | 32 + .../fluent/models/ConnectedRegistryInner.java | 24 + .../models/ConnectedRegistryProperties.java | 32 + .../fluent/models/ExportPipelineInner.java | 273 ++++ .../models/ExportPipelineProperties.java | 156 +++ .../fluent/models/ImportPipelineInner.java | 297 +++++ .../models/ImportPipelineProperties.java | 188 +++ .../fluent/models/PipelineRunInner.java | 223 ++++ .../fluent/models/PipelineRunProperties.java | 165 +++ .../fluent/models/RegistryInner.java | 109 ++ .../models/RegistryNameStatusInner.java | 20 +- .../fluent/models/RegistryProperties.java | 142 ++ .../RegistryPropertiesUpdateParameters.java | 95 ++ .../ArchiveVersionsClientImpl.java | 1047 +++++++++++++++ .../implementation/ArchivesClientImpl.java | 1168 +++++++++++++++++ .../ConnectedRegistriesClientImpl.java | 144 ++ ...ContainerRegistryManagementClientImpl.java | 82 +- .../ExportPipelinesClientImpl.java | 945 +++++++++++++ .../ImportPipelinesClientImpl.java | 945 +++++++++++++ .../PipelineRunsClientImpl.java | 934 +++++++++++++ .../models/ArchiveListResult.java | 107 ++ .../models/ArchiveVersionListResult.java | 108 ++ .../models/ExportPipelineListResult.java | 108 ++ .../models/ImportPipelineListResult.java | 108 ++ .../models/PipelineRunListResult.java | 107 ++ .../ArchivePackageSourceProperties.java | 122 ++ .../models/ArchiveUpdateParameters.java | 109 ++ .../AutoGeneratedDomainNameLabelScope.java | 66 + .../models/CacheRuleUpdateParameters.java | 31 + .../models/EndpointProtocol.java | 51 + .../ExportPipelineTargetProperties.java | 186 +++ .../ImportPipelineSourceProperties.java | 186 +++ .../models/MetadataSearch.java | 51 + .../models/PackageSourceType.java | 46 + .../models/PipelineOptions.java | 61 + .../models/PipelineRunRequest.java | 222 ++++ .../models/PipelineRunResponse.java | 257 ++++ .../models/PipelineRunSourceProperties.java | 121 ++ .../models/PipelineRunSourceType.java | 46 + .../models/PipelineRunTargetProperties.java | 121 ++ .../models/PipelineRunTargetType.java | 46 + .../PipelineSourceTriggerDescriptor.java | 88 ++ .../PipelineSourceTriggerProperties.java | 103 ++ .../models/PipelineSourceType.java | 46 + .../models/PipelineTriggerDescriptor.java | 86 ++ .../models/PipelineTriggerProperties.java | 97 ++ .../containerregistry/models/Policies.java | 31 + .../models/ProgressProperties.java | 82 ++ .../models/RegionalEndpoints.java | 51 + .../models/RegistryNameCheckRequest.java | 61 + .../models/RegistrySyncResult.java | 197 +++ .../models/RegistryUpdateParameters.java | 71 + .../models/SoftDeletePolicy.java | 140 ++ .../models/StorageAccessMode.java | 51 + .../containerregistry/models/SyncState.java | 71 + .../containerregistry/models/SyncTrigger.java | 61 + .../models/TriggerStatus.java | 11 +- ...rcemanager-containerregistry_metadata.json | 2 +- .../proxy-config.json | 2 +- .../generated/ActorTests.java | 4 +- .../generated/ArchiveInnerTests.java | 37 + .../generated/ArchiveListResultTests.java | 24 + .../ArchivePackageSourcePropertiesTests.java | 29 + .../generated/ArchivePropertiesTests.java | 38 + .../ArchiveUpdateParametersTests.java | 25 + .../ArchiveUpdatePropertiesTests.java | 25 + .../generated/ArchiveVersionInnerTests.java | 19 + .../ArchiveVersionListResultTests.java | 20 + .../ArchiveVersionPropertiesTests.java | 19 + .../generated/CallbackConfigInnerTests.java | 6 +- .../generated/EventContentTests.java | 42 +- .../generated/EventInfoInnerTests.java | 4 +- .../generated/EventRequestMessageTests.java | 50 +- .../GarbageCollectionPropertiesTests.java | 13 +- .../generated/IdentityPropertiesTests.java | 12 +- .../generated/IpRuleTests.java | 8 +- .../generated/LoggingPropertiesTests.java | 8 +- .../generated/LoginServerPropertiesTests.java | 2 +- .../generated/NetworkRuleSetTests.java | 11 +- .../generated/PipelineRunRequestTests.java | 49 + .../PipelineRunSourcePropertiesTests.java | 31 + .../PipelineRunTargetPropertiesTests.java | 29 + .../PipelineSourceTriggerDescriptorTests.java | 19 + .../PipelineSourceTriggerPropertiesTests.java | 26 + .../PipelineTriggerDescriptorTests.java | 20 + .../PipelineTriggerPropertiesTests.java | 28 + .../generated/PoliciesTests.java | 33 +- .../PrivateEndpointConnectionInnerTests.java | 20 +- ...vateEndpointConnectionListResultTests.java | 13 +- ...vateEndpointConnectionPropertiesTests.java | 26 +- .../generated/PrivateEndpointTests.java | 8 +- .../PrivateLinkResourceInnerTests.java | 4 +- .../PrivateLinkResourceListResultTests.java | 6 +- .../PrivateLinkResourcePropertiesTests.java | 6 +- ...rivateLinkServiceConnectionStateTests.java | 18 +- .../generated/ProgressPropertiesTests.java | 17 + .../generated/QuarantinePolicyTests.java | 8 +- .../RegistryNameCheckRequestTests.java | 20 +- .../RegistryNameStatusInnerTests.java | 11 +- .../generated/RegistryPasswordTests.java | 6 +- .../generated/RegistrySyncResultTests.java | 34 + .../RegistryUsageListResultInnerTests.java | 10 +- .../generated/RegistryUsageTests.java | 8 +- .../generated/ReplicationInnerTests.java | 16 +- .../generated/ReplicationListResultTests.java | 10 +- .../generated/ReplicationPropertiesTests.java | 2 +- .../ReplicationUpdateParametersTests.java | 15 +- .../generated/RequestTests.java | 12 +- .../generated/RetentionPolicyTests.java | 8 +- .../generated/ScopeMapInnerTests.java | 14 +- .../generated/ScopeMapListResultTests.java | 8 +- .../generated/ScopeMapPropertiesTests.java | 14 +- ...opeMapPropertiesUpdateParametersTests.java | 16 +- .../ScopeMapUpdateParametersTests.java | 18 +- .../containerregistry/generated/SkuTests.java | 8 +- .../generated/SoftDeletePolicyTests.java | 30 + .../generated/SourceTests.java | 8 +- .../generated/StatusTests.java | 5 +- .../generated/SyncUpdatePropertiesTests.java | 20 +- .../generated/TargetTests.java | 20 +- .../TlsCertificatePropertiesTests.java | 2 +- .../generated/TlsPropertiesTests.java | 5 +- .../generated/TokenPasswordTests.java | 20 +- .../generated/TrustPolicyTests.java | 8 +- .../UserIdentityPropertiesTests.java | 5 +- .../WebhookCreateParametersTests.java | 43 +- .../generated/WebhookInnerTests.java | 28 +- .../generated/WebhookListResultTests.java | 12 +- ...ebhookPropertiesCreateParametersTests.java | 27 +- .../generated/WebhookPropertiesTests.java | 17 +- ...ebhookPropertiesUpdateParametersTests.java | 32 +- .../WebhookUpdateParametersTests.java | 38 +- .../tsp-location.yaml | 2 +- .../ArchiveVersionsCreateSamples.java | 27 + .../ArchiveVersionsDeleteSamples.java | 27 + .../generated/ArchiveVersionsGetSamples.java | 27 + .../generated/ArchiveVersionsListSamples.java | 26 + .../generated/ArchivesCreateSamples.java | 36 + .../generated/ArchivesDeleteSamples.java | 27 + .../generated/ArchivesGetSamples.java | 27 + .../generated/ArchivesListSamples.java | 26 + .../generated/ArchivesUpdateSamples.java | 29 + .../generated/CacheRulesCreateSamples.java | 42 +- .../generated/CacheRulesDeleteSamples.java | 2 +- .../generated/CacheRulesGetSamples.java | 2 +- .../generated/CacheRulesListSamples.java | 2 +- .../generated/CacheRulesUpdateSamples.java | 2 +- .../ConnectedRegistriesCreateSamples.java | 2 +- .../ConnectedRegistriesDeactivateSamples.java | 2 +- .../ConnectedRegistriesDeleteSamples.java | 2 +- .../ConnectedRegistriesGetSamples.java | 2 +- .../ConnectedRegistriesListSamples.java | 2 +- .../ConnectedRegistriesResyncSamples.java | 27 + .../ConnectedRegistriesUpdateSamples.java | 2 +- .../CredentialSetsCreateSamples.java | 2 +- .../CredentialSetsDeleteSamples.java | 2 +- .../generated/CredentialSetsGetSamples.java | 2 +- .../generated/CredentialSetsListSamples.java | 2 +- .../CredentialSetsUpdateSamples.java | 2 +- .../ExportPipelinesCreateSamples.java | 42 + .../ExportPipelinesDeleteSamples.java | 26 + .../generated/ExportPipelinesGetSamples.java | 26 + .../generated/ExportPipelinesListSamples.java | 26 + .../ImportPipelinesCreateSamples.java | 63 + .../ImportPipelinesDeleteSamples.java | 26 + .../generated/ImportPipelinesGetSamples.java | 26 + .../generated/ImportPipelinesListSamples.java | 26 + .../generated/OperationsListSamples.java | 2 +- .../generated/PipelineRunsCreateSamples.java | 63 + .../generated/PipelineRunsDeleteSamples.java | 26 + .../generated/PipelineRunsGetSamples.java | 26 + .../generated/PipelineRunsListSamples.java | 26 + ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- ...egistriesCheckNameAvailabilitySamples.java | 15 +- .../generated/RegistriesCreateSamples.java | 28 +- .../generated/RegistriesDeleteSamples.java | 2 +- .../RegistriesGenerateCredentialsSamples.java | 2 +- .../RegistriesGetByResourceGroupSamples.java | 2 +- ...gistriesGetPrivateLinkResourceSamples.java | 2 +- .../RegistriesImportImageSamples.java | 6 +- .../RegistriesListByResourceGroupSamples.java | 2 +- .../RegistriesListCredentialsSamples.java | 2 +- ...striesListPrivateLinkResourcesSamples.java | 2 +- .../generated/RegistriesListSamples.java | 2 +- .../RegistriesListUsagesSamples.java | 2 +- ...RegistriesRegenerateCredentialSamples.java | 2 +- .../generated/RegistriesUpdateSamples.java | 2 +- .../generated/ReplicationsCreateSamples.java | 4 +- .../generated/ReplicationsDeleteSamples.java | 2 +- .../generated/ReplicationsGetSamples.java | 2 +- .../generated/ReplicationsListSamples.java | 2 +- .../generated/ReplicationsUpdateSamples.java | 2 +- .../generated/ScopeMapsCreateSamples.java | 2 +- .../generated/ScopeMapsDeleteSamples.java | 2 +- .../generated/ScopeMapsGetSamples.java | 2 +- .../generated/ScopeMapsListSamples.java | 2 +- .../generated/ScopeMapsUpdateSamples.java | 2 +- .../generated/TokensCreateSamples.java | 2 +- .../generated/TokensDeleteSamples.java | 2 +- .../generated/TokensGetSamples.java | 2 +- .../generated/TokensListSamples.java | 2 +- .../generated/TokensUpdateSamples.java | 2 +- .../generated/WebhooksCreateSamples.java | 2 +- .../generated/WebhooksDeleteSamples.java | 2 +- .../WebhooksGetCallbackConfigSamples.java | 2 +- .../generated/WebhooksGetSamples.java | 2 +- .../generated/WebhooksListEventsSamples.java | 2 +- .../generated/WebhooksListSamples.java | 2 +- .../generated/WebhooksPingSamples.java | 2 +- .../generated/WebhooksUpdateSamples.java | 2 +- 226 files changed, 15255 insertions(+), 472 deletions(-) create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchiveVersionsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchivesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ExportPipelinesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ImportPipelinesClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PipelineRunsClient.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveUpdateProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunInner.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchiveVersionsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchivesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ExportPipelinesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ImportPipelinesClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PipelineRunsClientImpl.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveVersionListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ExportPipelineListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ImportPipelineListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PipelineRunListResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchivePackageSourceProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchiveUpdateParameters.java create 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/EndpointProtocol.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPipelineTargetProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportPipelineSourceProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/MetadataSearch.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PackageSourceType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineOptions.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunRequest.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunResponse.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerDescriptor.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceType.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerDescriptor.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProgressProperties.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegionalEndpoints.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistrySyncResult.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SoftDeletePolicy.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StorageAccessMode.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncState.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncTrigger.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePackageSourcePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdateParametersTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdatePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionInnerTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionListResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunRequestTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunSourcePropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunTargetPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerDescriptorTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerDescriptorTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ProgressPropertiesTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistrySyncResultTests.java create mode 100644 sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SoftDeletePolicyTests.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesResyncSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsListSamples.java diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 9b9963d565f5..c7b682716a42 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -4,20 +4,240 @@ ### Breaking Changes -- Removed `resourceGroupName` and `autoGeneratedDomainNameLabelScope` from `RegistryNameCheckRequest` class. These APIs do not exist in api-version 2025-11-01. +#### `models.OperationListResult` was removed -#### Changes to `ContainerRegistryManagementClient` Class +#### `models.TokenListResult` 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.ConnectedRegistryListResult` was removed -### Other Changes +#### `models.ReplicationListResult` was removed + +#### `models.RegistryListResult` was removed + +#### `models.CredentialSetListResult` was removed + +#### `models.PrivateEndpointConnectionListResult` was removed + +#### `models.EventListResult` 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 +* `withUnit(java.lang.String)` was removed +* `withInternalMetricName(java.lang.String)` was removed +* `withDisplayDescription(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withName(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 +* `withValue(java.lang.String)` was removed +* `withName(models.PasswordName)` was removed + +#### `models.TlsCertificateProperties` was modified + +* `TlsCertificateProperties()` was changed to private access + +#### `models.Target` was modified + +* `Target()` was changed to private access +* `withTag(java.lang.String)` was removed +* `withMediaType(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withLength(java.lang.Long)` was removed +* `withDigest(java.lang.String)` was removed +* `withRepository(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `withSize(java.lang.Long)` was removed +* `withUrl(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 +* `withAddr(java.lang.String)` was removed +* `withInstanceId(java.lang.String)` was removed + +#### `models.RegistryUsage` was modified + +* `RegistryUsage()` was changed to private access +* `withUnit(models.RegistryUsageUnit)` was removed +* `withCurrentValue(java.lang.Long)` was removed +* `withLimit(java.lang.Long)` was removed +* `withName(java.lang.String)` was removed + +#### `models.EventResponseMessage` was modified + +* `EventResponseMessage()` was changed to private access +* `withReasonPhrase(java.lang.String)` was removed +* `withStatusCode(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withHeaders(java.util.Map)` was removed +* `withContent(java.lang.String)` was removed + +#### `models.EventContent` was modified + +* `EventContent()` was changed to private access +* `withActor(models.Actor)` was removed +* `withAction(java.lang.String)` was removed +* `withTimestamp(java.time.OffsetDateTime)` was removed +* `withTarget(models.Target)` was removed +* `withRequest(models.Request)` was removed +* `withSource(models.Source)` was removed +* `withId(java.lang.String)` was removed + +#### `models.OperationDisplayDefinition` was modified + +* `OperationDisplayDefinition()` was changed to private access +* `withOperation(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withResource(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 +* `withHeaders(java.util.Map)` was removed +* `withVersion(java.lang.String)` was removed +* `withContent(models.EventContent)` was removed +* `withMethod(java.lang.String)` was removed +* `withRequestUri(java.lang.String)` was removed + +#### `models.CredentialHealth` was modified + +* `CredentialHealth()` was changed to private access +* `withErrorCode(java.lang.String)` was removed +* `withStatus(models.CredentialHealthStatus)` 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 + +#### `models.Request` was modified + +* `Request()` was changed to private access +* `withUseragent(java.lang.String)` was removed +* `withAddr(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `withHost(java.lang.String)` was removed +* `withMethod(java.lang.String)` was removed + +### Features Added + +* `models.PipelineTriggerDescriptor` was added + +* `models.ArchiveUpdateParameters` was added + +* `models.ProgressProperties` was added + +* `models.PipelineOptions` was added + +* `models.PipelineSourceTriggerDescriptor` was added + +* `models.PipelineRunTargetProperties` was added + +* `models.ArchivePackageSourceProperties` was added + +* `models.MetadataSearch` was added + +* `models.RegistrySyncResult` was added + +* `models.ExportPipelineTargetProperties` was added + +* `models.ImportPipelineSourceProperties` was added + +* `models.SyncState` was added + +* `models.SoftDeletePolicy` was added + +* `models.PipelineRunRequest` was added + +* `models.PipelineSourceType` was added + +* `models.RegionalEndpoints` was added + +* `models.PackageSourceType` was added + +* `models.PipelineRunSourceProperties` was added + +* `models.PipelineRunSourceType` was added + +* `models.SyncTrigger` was added + +* `models.EndpointProtocol` was added + +* `models.PipelineRunResponse` was added + +* `models.PipelineSourceTriggerProperties` was added + +* `models.PipelineTriggerProperties` was added + +* `models.StorageAccessMode` was added + +* `models.PipelineRunTargetType` was added + +#### `models.CacheRuleUpdateParameters` was modified + +* `withIdentity(models.IdentityProperties)` was added +* `identity()` was added + +#### `models.Policies` was modified + +* `withSoftDeletePolicy(models.SoftDeletePolicy)` was added +* `softDeletePolicy()` was added + +#### `models.RegistryUpdateParameters` was modified + +* `endpointProtocol()` was added +* `withEndpointProtocol(models.EndpointProtocol)` was added +* `regionalEndpoints()` was added +* `withRegionalEndpoints(models.RegionalEndpoints)` was added +* `withMetadataSearch(models.MetadataSearch)` was added +* `metadataSearch()` was added + +#### `ContainerRegistryManager` was modified -- Registry Tasks related feature is deprecated in this library. Please use "azure-resourcemanager-containerregistry-tasks" library. +* `taskClient()` was added ## 2.54.2 (2026-01-29) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchiveVersionsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchiveVersionsClient.java new file mode 100644 index 000000000000..6585f20912e4 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchiveVersionsClient.java @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.ArchiveVersionInner; +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 ArchiveVersionsClient. + */ +public interface ArchiveVersionsClient { + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName); + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName); + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName, Context context); + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveVersionInner get(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ArchiveVersionInner> beginCreateAsync(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArchiveVersionInner> beginCreate(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArchiveVersionInner> beginCreate(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName, Context context); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveVersionInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName); + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveVersionInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName, Context context); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName, Context context); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName); + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName, Context context); + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName, String packageType, + String archiveName); + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String packageType, + String archiveName); + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchivesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchivesClient.java new file mode 100644 index 000000000000..4e141a9726d8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchivesClient.java @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.ArchiveInner; +import com.azure.resourcemanager.containerregistry.models.ArchiveUpdateParameters; +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 ArchivesClient. + */ +public interface ArchivesClient { + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String registryName, String packageType, + String archiveName); + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String packageType, String archiveName); + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context); + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveInner get(String resourceGroupName, String registryName, String packageType, String archiveName); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ArchiveInner> beginCreateAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArchiveInner> beginCreate(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArchiveInner> beginCreate(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters, Context context); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveInner archiveCreateParameters); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveInner archiveCreateParameters); + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveInner archiveCreateParameters, Context context); + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveUpdateParameters archiveUpdateParameters); + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveUpdateParameters archiveUpdateParameters); + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveUpdateParameters archiveUpdateParameters, Context context); + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArchiveInner update(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveUpdateParameters archiveUpdateParameters); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String packageType, + String archiveName); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String registryName, String packageType, String archiveName); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String packageType, String archiveName); + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String packageType, String archiveName, Context context); + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName, String packageType); + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String packageType); + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String packageType, + 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 23716a280cca..10efe114dfa1 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 @@ -592,4 +592,66 @@ SyncPoller, Void> beginDeactivate(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) void deactivate(String resourceGroupName, String registryName, String connectedRegistryName, Context context); + + /** + * Resync 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 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) + Mono> resyncWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName); + + /** + * Resync 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 an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono resyncAsync(String resourceGroupName, String registryName, + String connectedRegistryName); + + /** + * Resync 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 an object that represents a connected registry for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resyncWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context); + + /** + * Resync 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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedRegistryInner resync(String resourceGroupName, String registryName, String connectedRegistryName); } 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 d4400f824714..c60109a196b2 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 @@ -60,6 +60,20 @@ public interface ContainerRegistryManagementClient { */ RegistriesClient getRegistries(); + /** + * Gets the ArchivesClient object to access its operations. + * + * @return the ArchivesClient object. + */ + ArchivesClient getArchives(); + + /** + * Gets the ArchiveVersionsClient object to access its operations. + * + * @return the ArchiveVersionsClient object. + */ + ArchiveVersionsClient getArchiveVersions(); + /** * Gets the CacheRulesClient object to access its operations. * @@ -109,6 +123,27 @@ public interface ContainerRegistryManagementClient { */ TokensClient getTokens(); + /** + * Gets the ExportPipelinesClient object to access its operations. + * + * @return the ExportPipelinesClient object. + */ + ExportPipelinesClient getExportPipelines(); + + /** + * Gets the ImportPipelinesClient object to access its operations. + * + * @return the ImportPipelinesClient object. + */ + ImportPipelinesClient getImportPipelines(); + + /** + * Gets the PipelineRunsClient object to access its operations. + * + * @return the PipelineRunsClient object. + */ + PipelineRunsClient getPipelineRuns(); + /** * Gets the WebhooksClient object to access its operations. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ExportPipelinesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ExportPipelinesClient.java new file mode 100644 index 000000000000..faf105caf59e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ExportPipelinesClient.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.ExportPipelineInner; +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 ExportPipelinesClient. + */ +public interface ExportPipelinesClient { + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 export pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName); + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 export pipeline on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String exportPipelineName); + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 export pipeline along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String exportPipelineName, Context context); + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 export pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExportPipelineInner get(String resourceGroupName, String registryName, String exportPipelineName); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ExportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters, + Context context); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync(String resourceGroupName, String registryName, String exportPipelineName, + ExportPipelineInner exportPipelineCreateParameters); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExportPipelineInner create(String resourceGroupName, String registryName, String exportPipelineName, + ExportPipelineInner exportPipelineCreateParameters); + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExportPipelineInner create(String resourceGroupName, String registryName, String exportPipelineName, + ExportPipelineInner exportPipelineCreateParameters, Context context); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String exportPipelineName); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 exportPipelineName); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 exportPipelineName, Context context); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String registryName, String exportPipelineName); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 exportPipelineName); + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 exportPipelineName, Context context); + + /** + * Lists all export pipelines for the 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 export pipelines for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all export pipelines for the 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 export pipelines for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all export pipelines for the specified 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 export pipelines 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/ImportPipelinesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ImportPipelinesClient.java new file mode 100644 index 000000000000..fb896c7da8c3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ImportPipelinesClient.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.ImportPipelineInner; +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 ImportPipelinesClient. + */ +public interface ImportPipelinesClient { + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 import pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName); + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 import pipeline on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String importPipelineName); + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 import pipeline along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String importPipelineName, Context context); + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 import pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ImportPipelineInner get(String resourceGroupName, String registryName, String importPipelineName); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName, ImportPipelineInner importPipelineCreateParameters); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ImportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ImportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ImportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters, + Context context); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync(String resourceGroupName, String registryName, String importPipelineName, + ImportPipelineInner importPipelineCreateParameters); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ImportPipelineInner create(String resourceGroupName, String registryName, String importPipelineName, + ImportPipelineInner importPipelineCreateParameters); + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ImportPipelineInner create(String resourceGroupName, String registryName, String importPipelineName, + ImportPipelineInner importPipelineCreateParameters, Context context); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String importPipelineName); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 importPipelineName); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 importPipelineName, Context context); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String registryName, String importPipelineName); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 importPipelineName); + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 importPipelineName, Context context); + + /** + * Lists all import pipelines for the 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 import pipelines for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all import pipelines for the 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 import pipelines for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all import pipelines for the specified 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 import pipelines 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/PipelineRunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PipelineRunsClient.java new file mode 100644 index 000000000000..3b698fd0fae9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/PipelineRunsClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.PipelineRunInner; +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 PipelineRunsClient. + */ +public interface PipelineRunsClient { + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName); + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String pipelineRunName); + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String pipelineRunName, + Context context); + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineRunInner get(String resourceGroupName, String registryName, String pipelineRunName); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName, PipelineRunInner pipelineRunCreateParameters); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PipelineRunInner> beginCreateAsync(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PipelineRunInner> beginCreate(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PipelineRunInner> beginCreate(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters, Context context); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineRunInner create(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters); + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineRunInner create(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters, Context context); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String pipelineRunName); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 pipelineRunName); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 pipelineRunName, Context context); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String registryName, String pipelineRunName); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 pipelineRunName); + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 pipelineRunName, Context context); + + /** + * Lists all the pipeline runs for the 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 pipeline runs for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all the pipeline runs for the 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 pipeline runs for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all the pipeline runs for the specified 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 pipeline runs 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/models/ArchiveInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveInner.java new file mode 100644 index 000000000000..dc85d24a6805 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveInner.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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.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.models.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; + +/** + * An object that represents a archive for a container registry. + */ +@Fluent +public final class ArchiveInner extends ProxyResource { + /* + * The properties of the archive. + */ + private ArchiveProperties innerProperties; + + /* + * 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 ArchiveInner class. + */ + public ArchiveInner() { + } + + /** + * Get the innerProperties property: The properties of the archive. + * + * @return the innerProperties value. + */ + private ArchiveProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** + * Get the packageSource property: The package source of the archive. + * + * @return the packageSource value. + */ + public ArchivePackageSourceProperties packageSource() { + return this.innerProperties() == null ? null : this.innerProperties().packageSource(); + } + + /** + * Set the packageSource property: The package source of the archive. + * + * @param packageSource the packageSource value to set. + * @return the ArchiveInner object itself. + */ + public ArchiveInner withPackageSource(ArchivePackageSourceProperties packageSource) { + if (this.innerProperties() == null) { + this.innerProperties = new ArchiveProperties(); + } + this.innerProperties().withPackageSource(packageSource); + return this; + } + + /** + * Get the publishedVersion property: The published version of the archive. + * + * @return the publishedVersion value. + */ + public String publishedVersion() { + return this.innerProperties() == null ? null : this.innerProperties().publishedVersion(); + } + + /** + * Set the publishedVersion property: The published version of the archive. + * + * @param publishedVersion the publishedVersion value to set. + * @return the ArchiveInner object itself. + */ + public ArchiveInner withPublishedVersion(String publishedVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ArchiveProperties(); + } + this.innerProperties().withPublishedVersion(publishedVersion); + return this; + } + + /** + * Get the repositoryEndpointPrefix property: The repositoryEndpointPrefix property. + * + * @return the repositoryEndpointPrefix value. + */ + public String repositoryEndpointPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryEndpointPrefix(); + } + + /** + * Set the repositoryEndpointPrefix property: The repositoryEndpointPrefix property. + * + * @param repositoryEndpointPrefix the repositoryEndpointPrefix value to set. + * @return the ArchiveInner object itself. + */ + public ArchiveInner withRepositoryEndpointPrefix(String repositoryEndpointPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new ArchiveProperties(); + } + this.innerProperties().withRepositoryEndpointPrefix(repositoryEndpointPrefix); + return this; + } + + /** + * Get the repositoryEndpoint property: The repositoryEndpoint property. + * + * @return the repositoryEndpoint value. + */ + public String repositoryEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryEndpoint(); + } + + /** + * Get the provisioningState property: The provisioning state of the archive at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveInner 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 ArchiveInner. + */ + public static ArchiveInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveInner deserializedArchiveInner = new ArchiveInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedArchiveInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedArchiveInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedArchiveInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedArchiveInner.innerProperties = ArchiveProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedArchiveInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveProperties.java new file mode 100644 index 000000000000..7b627391776a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveProperties.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.models.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; + +/** + * The properties of a archive. + */ +@Fluent +public final class ArchiveProperties implements JsonSerializable { + /* + * The package source of the archive. + */ + private ArchivePackageSourceProperties packageSource; + + /* + * The published version of the archive. + */ + private String publishedVersion; + + /* + * The repositoryEndpointPrefix property. + */ + private String repositoryEndpointPrefix; + + /* + * The repositoryEndpoint property. + */ + private String repositoryEndpoint; + + /* + * The provisioning state of the archive at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ArchiveProperties class. + */ + public ArchiveProperties() { + } + + /** + * Get the packageSource property: The package source of the archive. + * + * @return the packageSource value. + */ + public ArchivePackageSourceProperties packageSource() { + return this.packageSource; + } + + /** + * Set the packageSource property: The package source of the archive. + * + * @param packageSource the packageSource value to set. + * @return the ArchiveProperties object itself. + */ + public ArchiveProperties withPackageSource(ArchivePackageSourceProperties packageSource) { + this.packageSource = packageSource; + return this; + } + + /** + * Get the publishedVersion property: The published version of the archive. + * + * @return the publishedVersion value. + */ + public String publishedVersion() { + return this.publishedVersion; + } + + /** + * Set the publishedVersion property: The published version of the archive. + * + * @param publishedVersion the publishedVersion value to set. + * @return the ArchiveProperties object itself. + */ + public ArchiveProperties withPublishedVersion(String publishedVersion) { + this.publishedVersion = publishedVersion; + return this; + } + + /** + * Get the repositoryEndpointPrefix property: The repositoryEndpointPrefix property. + * + * @return the repositoryEndpointPrefix value. + */ + public String repositoryEndpointPrefix() { + return this.repositoryEndpointPrefix; + } + + /** + * Set the repositoryEndpointPrefix property: The repositoryEndpointPrefix property. + * + * @param repositoryEndpointPrefix the repositoryEndpointPrefix value to set. + * @return the ArchiveProperties object itself. + */ + public ArchiveProperties withRepositoryEndpointPrefix(String repositoryEndpointPrefix) { + this.repositoryEndpointPrefix = repositoryEndpointPrefix; + return this; + } + + /** + * Get the repositoryEndpoint property: The repositoryEndpoint property. + * + * @return the repositoryEndpoint value. + */ + public String repositoryEndpoint() { + return this.repositoryEndpoint; + } + + /** + * Get the provisioningState property: The provisioning state of the archive at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageSource() != null) { + packageSource().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("packageSource", this.packageSource); + jsonWriter.writeStringField("publishedVersion", this.publishedVersion); + jsonWriter.writeStringField("repositoryEndpointPrefix", this.repositoryEndpointPrefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveProperties 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 ArchiveProperties. + */ + public static ArchiveProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveProperties deserializedArchiveProperties = new ArchiveProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("packageSource".equals(fieldName)) { + deserializedArchiveProperties.packageSource = ArchivePackageSourceProperties.fromJson(reader); + } else if ("publishedVersion".equals(fieldName)) { + deserializedArchiveProperties.publishedVersion = reader.getString(); + } else if ("repositoryEndpointPrefix".equals(fieldName)) { + deserializedArchiveProperties.repositoryEndpointPrefix = reader.getString(); + } else if ("repositoryEndpoint".equals(fieldName)) { + deserializedArchiveProperties.repositoryEndpoint = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedArchiveProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveUpdateProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveUpdateProperties.java new file mode 100644 index 000000000000..9ef2f8085500 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveUpdateProperties.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.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 properties of a archive. + */ +@Fluent +public final class ArchiveUpdateProperties implements JsonSerializable { + /* + * The published version of the archive. + */ + private String publishedVersion; + + /** + * Creates an instance of ArchiveUpdateProperties class. + */ + public ArchiveUpdateProperties() { + } + + /** + * Get the publishedVersion property: The published version of the archive. + * + * @return the publishedVersion value. + */ + public String publishedVersion() { + return this.publishedVersion; + } + + /** + * Set the publishedVersion property: The published version of the archive. + * + * @param publishedVersion the publishedVersion value to set. + * @return the ArchiveUpdateProperties object itself. + */ + public ArchiveUpdateProperties withPublishedVersion(String publishedVersion) { + this.publishedVersion = publishedVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publishedVersion", this.publishedVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveUpdateProperties 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 ArchiveUpdateProperties. + */ + public static ArchiveUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveUpdateProperties deserializedArchiveUpdateProperties = new ArchiveUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publishedVersion".equals(fieldName)) { + deserializedArchiveUpdateProperties.publishedVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveUpdateProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionInner.java new file mode 100644 index 000000000000..7553ba676b03 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionInner.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.models.ProvisioningState; +import java.io.IOException; + +/** + * An object that represents an export pipeline for a container registry. + */ +@Immutable +public final class ArchiveVersionInner extends ProxyResource { + /* + * The properties of the archive. + */ + private ArchiveVersionProperties innerProperties; + + /* + * 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 ArchiveVersionInner class. + */ + private ArchiveVersionInner() { + } + + /** + * Get the innerProperties property: The properties of the archive. + * + * @return the innerProperties value. + */ + private ArchiveVersionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** + * Get the provisioningState property: The provisioning state of the archive at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the archiveVersionErrorMessage property: The detailed error message for the archive version in the case of + * failure. + * + * @return the archiveVersionErrorMessage value. + */ + public String archiveVersionErrorMessage() { + return this.innerProperties() == null ? null : this.innerProperties().archiveVersionErrorMessage(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveVersionInner 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 ArchiveVersionInner. + */ + public static ArchiveVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveVersionInner deserializedArchiveVersionInner = new ArchiveVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedArchiveVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedArchiveVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedArchiveVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedArchiveVersionInner.innerProperties = ArchiveVersionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedArchiveVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveVersionInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionProperties.java new file mode 100644 index 000000000000..58a1f858a3f2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.models.ProvisioningState; +import java.io.IOException; + +/** + * The properties of an archive version. + */ +@Immutable +public final class ArchiveVersionProperties implements JsonSerializable { + /* + * The provisioning state of the archive at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /* + * The detailed error message for the archive version in the case of failure. + */ + private String archiveVersionErrorMessage; + + /** + * Creates an instance of ArchiveVersionProperties class. + */ + private ArchiveVersionProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the archive at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the archiveVersionErrorMessage property: The detailed error message for the archive version in the case of + * failure. + * + * @return the archiveVersionErrorMessage value. + */ + public String archiveVersionErrorMessage() { + return this.archiveVersionErrorMessage; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("archiveVersionErrorMessage", this.archiveVersionErrorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveVersionProperties 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 ArchiveVersionProperties. + */ + public static ArchiveVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveVersionProperties deserializedArchiveVersionProperties = new ArchiveVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedArchiveVersionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("archiveVersionErrorMessage".equals(fieldName)) { + deserializedArchiveVersionProperties.archiveVersionErrorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveVersionProperties; + }); + } +} 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 00e073f9b9d2..f033b28eaeef 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; import com.azure.resourcemanager.containerregistry.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -24,6 +25,11 @@ public final class CacheRuleInner extends ProxyResource { */ private CacheRuleProperties innerProperties; + /* + * The identity of the cache rule. + */ + private IdentityProperties identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -59,6 +65,26 @@ private CacheRuleProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The identity of the cache rule. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the cache rule. + * + * @param identity the identity value to set. + * @return the CacheRuleInner object itself. + */ + public CacheRuleInner withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -198,6 +224,9 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().validate(); + } } /** @@ -207,6 +236,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -234,6 +264,8 @@ public static CacheRuleInner fromJson(JsonReader jsonReader) throws IOException deserializedCacheRuleInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedCacheRuleInner.innerProperties = CacheRuleProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedCacheRuleInner.identity = IdentityProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedCacheRuleInner.systemData = SystemData.fromJson(reader); } else { 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 fa2a7e921c8d..0ccfb474ac14 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 @@ -18,6 +18,7 @@ import com.azure.resourcemanager.containerregistry.models.LoginServerProperties; import com.azure.resourcemanager.containerregistry.models.ParentProperties; import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.azure.resourcemanager.containerregistry.models.RegistrySyncResult; import com.azure.resourcemanager.containerregistry.models.StatusDetailProperties; import java.io.IOException; import java.time.OffsetDateTime; @@ -328,6 +329,29 @@ public ConnectedRegistryInner withGarbageCollection(GarbageCollectionProperties return this; } + /** + * Get the registrySyncResult property: The result of the connected registry's most recent sync with its parent. + * + * @return the registrySyncResult value. + */ + public RegistrySyncResult registrySyncResult() { + return this.innerProperties() == null ? null : this.innerProperties().registrySyncResult(); + } + + /** + * Set the registrySyncResult property: The result of the connected registry's most recent sync with its parent. + * + * @param registrySyncResult the registrySyncResult value to set. + * @return the ConnectedRegistryInner object itself. + */ + public ConnectedRegistryInner withRegistrySyncResult(RegistrySyncResult registrySyncResult) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedRegistryProperties(); + } + this.innerProperties().withRegistrySyncResult(registrySyncResult); + return this; + } + /** * Validates the instance. * 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 c4718f0d605f..96667f2d029d 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 @@ -19,6 +19,7 @@ import com.azure.resourcemanager.containerregistry.models.LoginServerProperties; import com.azure.resourcemanager.containerregistry.models.ParentProperties; import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.azure.resourcemanager.containerregistry.models.RegistrySyncResult; import com.azure.resourcemanager.containerregistry.models.StatusDetailProperties; import java.io.IOException; import java.time.OffsetDateTime; @@ -94,6 +95,11 @@ public final class ConnectedRegistryProperties implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("garbageCollection", this.garbageCollection); + jsonWriter.writeJsonField("registrySyncResult", this.registrySyncResult); return jsonWriter.writeEndObject(); } @@ -405,6 +435,8 @@ public static ConnectedRegistryProperties fromJson(JsonReader jsonReader) throws } else if ("garbageCollection".equals(fieldName)) { deserializedConnectedRegistryProperties.garbageCollection = GarbageCollectionProperties.fromJson(reader); + } else if ("registrySyncResult".equals(fieldName)) { + deserializedConnectedRegistryProperties.registrySyncResult = RegistrySyncResult.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineInner.java new file mode 100644 index 000000000000..74da1e0452e2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineInner.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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.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.models.ExportPipelineTargetProperties; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * An object that represents an export pipeline for a container registry. + */ +@Fluent +public final class ExportPipelineInner extends ProxyResource { + /* + * The properties of the export pipeline. + */ + private ExportPipelineProperties innerProperties; + + /* + * The location of the export pipeline. + */ + private String location; + + /* + * The identity of the export pipeline. + */ + 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 ExportPipelineInner class. + */ + public ExportPipelineInner() { + } + + /** + * Get the innerProperties property: The properties of the export pipeline. + * + * @return the innerProperties value. + */ + private ExportPipelineProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the location property: The location of the export pipeline. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location of the export pipeline. + * + * @param location the location value to set. + * @return the ExportPipelineInner object itself. + */ + public ExportPipelineInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the identity property: The identity of the export pipeline. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the export pipeline. + * + * @param identity the identity value to set. + * @return the ExportPipelineInner object itself. + */ + public ExportPipelineInner 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; + } + + /** + * Get the target property: The target properties of the export pipeline. + * + * @return the target value. + */ + public ExportPipelineTargetProperties target() { + return this.innerProperties() == null ? null : this.innerProperties().target(); + } + + /** + * Set the target property: The target properties of the export pipeline. + * + * @param target the target value to set. + * @return the ExportPipelineInner object itself. + */ + public ExportPipelineInner withTarget(ExportPipelineTargetProperties target) { + if (this.innerProperties() == null) { + this.innerProperties = new ExportPipelineProperties(); + } + this.innerProperties().withTarget(target); + return this; + } + + /** + * Get the options property: The list of all options configured for the pipeline. + * + * @return the options value. + */ + public List options() { + return this.innerProperties() == null ? null : this.innerProperties().options(); + } + + /** + * Set the options property: The list of all options configured for the pipeline. + * + * @param options the options value to set. + * @return the ExportPipelineInner object itself. + */ + public ExportPipelineInner withOptions(List options) { + if (this.innerProperties() == null) { + this.innerProperties = new ExportPipelineProperties(); + } + this.innerProperties().withOptions(options); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the pipeline at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportPipelineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPipelineInner 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 ExportPipelineInner. + */ + public static ExportPipelineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPipelineInner deserializedExportPipelineInner = new ExportPipelineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExportPipelineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExportPipelineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExportPipelineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExportPipelineInner.innerProperties = ExportPipelineProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedExportPipelineInner.location = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedExportPipelineInner.identity = IdentityProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExportPipelineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPipelineInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineProperties.java new file mode 100644 index 000000000000..06fe5add4d7a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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.models.ExportPipelineTargetProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * The properties of an export pipeline. + */ +@Fluent +public final class ExportPipelineProperties implements JsonSerializable { + /* + * The target properties of the export pipeline. + */ + private ExportPipelineTargetProperties target; + + /* + * The list of all options configured for the pipeline. + */ + private List options; + + /* + * The provisioning state of the pipeline at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ExportPipelineProperties class. + */ + public ExportPipelineProperties() { + } + + /** + * Get the target property: The target properties of the export pipeline. + * + * @return the target value. + */ + public ExportPipelineTargetProperties target() { + return this.target; + } + + /** + * Set the target property: The target properties of the export pipeline. + * + * @param target the target value to set. + * @return the ExportPipelineProperties object itself. + */ + public ExportPipelineProperties withTarget(ExportPipelineTargetProperties target) { + this.target = target; + return this; + } + + /** + * Get the options property: The list of all options configured for the pipeline. + * + * @return the options value. + */ + public List options() { + return this.options; + } + + /** + * Set the options property: The list of all options configured for the pipeline. + * + * @param options the options value to set. + * @return the ExportPipelineProperties object itself. + */ + public ExportPipelineProperties withOptions(List options) { + this.options = options; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the pipeline at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (target() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property target in model ExportPipelineProperties")); + } else { + target().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExportPipelineProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("target", this.target); + jsonWriter.writeArrayField("options", this.options, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportPipelineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPipelineProperties 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 ExportPipelineProperties. + */ + public static ExportPipelineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPipelineProperties deserializedExportPipelineProperties = new ExportPipelineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("target".equals(fieldName)) { + deserializedExportPipelineProperties.target = ExportPipelineTargetProperties.fromJson(reader); + } else if ("options".equals(fieldName)) { + List options + = reader.readArray(reader1 -> PipelineOptions.fromString(reader1.getString())); + deserializedExportPipelineProperties.options = options; + } else if ("provisioningState".equals(fieldName)) { + deserializedExportPipelineProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPipelineProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineInner.java new file mode 100644 index 000000000000..dc32e768a484 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineInner.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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.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.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.ImportPipelineSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.PipelineTriggerProperties; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * An object that represents an import pipeline for a container registry. + */ +@Fluent +public final class ImportPipelineInner extends ProxyResource { + /* + * The properties of the import pipeline. + */ + private ImportPipelineProperties innerProperties; + + /* + * The location of the import pipeline. + */ + private String location; + + /* + * The identity of the import pipeline. + */ + 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 ImportPipelineInner class. + */ + public ImportPipelineInner() { + } + + /** + * Get the innerProperties property: The properties of the import pipeline. + * + * @return the innerProperties value. + */ + private ImportPipelineProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the location property: The location of the import pipeline. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location of the import pipeline. + * + * @param location the location value to set. + * @return the ImportPipelineInner object itself. + */ + public ImportPipelineInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the identity property: The identity of the import pipeline. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the import pipeline. + * + * @param identity the identity value to set. + * @return the ImportPipelineInner object itself. + */ + public ImportPipelineInner 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; + } + + /** + * Get the source property: The source properties of the import pipeline. + * + * @return the source value. + */ + public ImportPipelineSourceProperties source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: The source properties of the import pipeline. + * + * @param source the source value to set. + * @return the ImportPipelineInner object itself. + */ + public ImportPipelineInner withSource(ImportPipelineSourceProperties source) { + if (this.innerProperties() == null) { + this.innerProperties = new ImportPipelineProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the trigger property: The properties that describe the trigger of the import pipeline. + * + * @return the trigger value. + */ + public PipelineTriggerProperties trigger() { + return this.innerProperties() == null ? null : this.innerProperties().trigger(); + } + + /** + * Set the trigger property: The properties that describe the trigger of the import pipeline. + * + * @param trigger the trigger value to set. + * @return the ImportPipelineInner object itself. + */ + public ImportPipelineInner withTrigger(PipelineTriggerProperties trigger) { + if (this.innerProperties() == null) { + this.innerProperties = new ImportPipelineProperties(); + } + this.innerProperties().withTrigger(trigger); + return this; + } + + /** + * Get the options property: The list of all options configured for the pipeline. + * + * @return the options value. + */ + public List options() { + return this.innerProperties() == null ? null : this.innerProperties().options(); + } + + /** + * Set the options property: The list of all options configured for the pipeline. + * + * @param options the options value to set. + * @return the ImportPipelineInner object itself. + */ + public ImportPipelineInner withOptions(List options) { + if (this.innerProperties() == null) { + this.innerProperties = new ImportPipelineProperties(); + } + this.innerProperties().withOptions(options); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the pipeline at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportPipelineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportPipelineInner 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 ImportPipelineInner. + */ + public static ImportPipelineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportPipelineInner deserializedImportPipelineInner = new ImportPipelineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImportPipelineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedImportPipelineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedImportPipelineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedImportPipelineInner.innerProperties = ImportPipelineProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedImportPipelineInner.location = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedImportPipelineInner.identity = IdentityProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedImportPipelineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportPipelineInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineProperties.java new file mode 100644 index 000000000000..bd7c9a210bdc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineProperties.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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.util.logging.ClientLogger; +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.models.ImportPipelineSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.PipelineTriggerProperties; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * The properties of an import pipeline. + */ +@Fluent +public final class ImportPipelineProperties implements JsonSerializable { + /* + * The source properties of the import pipeline. + */ + private ImportPipelineSourceProperties source; + + /* + * The properties that describe the trigger of the import pipeline. + */ + private PipelineTriggerProperties trigger; + + /* + * The list of all options configured for the pipeline. + */ + private List options; + + /* + * The provisioning state of the pipeline at the time the operation was called. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ImportPipelineProperties class. + */ + public ImportPipelineProperties() { + } + + /** + * Get the source property: The source properties of the import pipeline. + * + * @return the source value. + */ + public ImportPipelineSourceProperties source() { + return this.source; + } + + /** + * Set the source property: The source properties of the import pipeline. + * + * @param source the source value to set. + * @return the ImportPipelineProperties object itself. + */ + public ImportPipelineProperties withSource(ImportPipelineSourceProperties source) { + this.source = source; + return this; + } + + /** + * Get the trigger property: The properties that describe the trigger of the import pipeline. + * + * @return the trigger value. + */ + public PipelineTriggerProperties trigger() { + return this.trigger; + } + + /** + * Set the trigger property: The properties that describe the trigger of the import pipeline. + * + * @param trigger the trigger value to set. + * @return the ImportPipelineProperties object itself. + */ + public ImportPipelineProperties withTrigger(PipelineTriggerProperties trigger) { + this.trigger = trigger; + return this; + } + + /** + * Get the options property: The list of all options configured for the pipeline. + * + * @return the options value. + */ + public List options() { + return this.options; + } + + /** + * Set the options property: The list of all options configured for the pipeline. + * + * @param options the options value to set. + * @return the ImportPipelineProperties object itself. + */ + public ImportPipelineProperties withOptions(List options) { + this.options = options; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the pipeline at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (source() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property source in model ImportPipelineProperties")); + } else { + source().validate(); + } + if (trigger() != null) { + trigger().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ImportPipelineProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("source", this.source); + jsonWriter.writeJsonField("trigger", this.trigger); + jsonWriter.writeArrayField("options", this.options, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportPipelineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportPipelineProperties 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 ImportPipelineProperties. + */ + public static ImportPipelineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportPipelineProperties deserializedImportPipelineProperties = new ImportPipelineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("source".equals(fieldName)) { + deserializedImportPipelineProperties.source = ImportPipelineSourceProperties.fromJson(reader); + } else if ("trigger".equals(fieldName)) { + deserializedImportPipelineProperties.trigger = PipelineTriggerProperties.fromJson(reader); + } else if ("options".equals(fieldName)) { + List options + = reader.readArray(reader1 -> PipelineOptions.fromString(reader1.getString())); + deserializedImportPipelineProperties.options = options; + } else if ("provisioningState".equals(fieldName)) { + deserializedImportPipelineProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedImportPipelineProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunInner.java new file mode 100644 index 000000000000..5ab247e9a916 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunInner.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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.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.models.PipelineRunRequest; +import com.azure.resourcemanager.containerregistry.models.PipelineRunResponse; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; + +/** + * An object that represents a pipeline run for a container registry. + */ +@Fluent +public final class PipelineRunInner extends ProxyResource { + /* + * The properties of a pipeline run. + */ + private PipelineRunProperties innerProperties; + + /* + * 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 PipelineRunInner class. + */ + public PipelineRunInner() { + } + + /** + * Get the innerProperties property: The properties of a pipeline run. + * + * @return the innerProperties value. + */ + private PipelineRunProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** + * Get the provisioningState property: The provisioning state of a pipeline run. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the request property: The request parameters for a pipeline run. + * + * @return the request value. + */ + public PipelineRunRequest request() { + return this.innerProperties() == null ? null : this.innerProperties().request(); + } + + /** + * Set the request property: The request parameters for a pipeline run. + * + * @param request the request value to set. + * @return the PipelineRunInner object itself. + */ + public PipelineRunInner withRequest(PipelineRunRequest request) { + if (this.innerProperties() == null) { + this.innerProperties = new PipelineRunProperties(); + } + this.innerProperties().withRequest(request); + return this; + } + + /** + * Get the response property: The response of a pipeline run. + * + * @return the response value. + */ + public PipelineRunResponse response() { + return this.innerProperties() == null ? null : this.innerProperties().response(); + } + + /** + * Get the forceUpdateTag property: How the pipeline run should be forced to recreate even if the pipeline run + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.innerProperties() == null ? null : this.innerProperties().forceUpdateTag(); + } + + /** + * Set the forceUpdateTag property: How the pipeline run should be forced to recreate even if the pipeline run + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the PipelineRunInner object itself. + */ + public PipelineRunInner withForceUpdateTag(String forceUpdateTag) { + if (this.innerProperties() == null) { + this.innerProperties = new PipelineRunProperties(); + } + this.innerProperties().withForceUpdateTag(forceUpdateTag); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunInner 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 PipelineRunInner. + */ + public static PipelineRunInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunInner deserializedPipelineRunInner = new PipelineRunInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPipelineRunInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPipelineRunInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPipelineRunInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPipelineRunInner.innerProperties = PipelineRunProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPipelineRunInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunInner; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunProperties.java new file mode 100644 index 000000000000..b16941a032bc --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunProperties.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.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.models.PipelineRunRequest; +import com.azure.resourcemanager.containerregistry.models.PipelineRunResponse; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import java.io.IOException; + +/** + * The properties of a pipeline run. + */ +@Fluent +public final class PipelineRunProperties implements JsonSerializable { + /* + * The provisioning state of a pipeline run. + */ + private ProvisioningState provisioningState; + + /* + * The request parameters for a pipeline run. + */ + private PipelineRunRequest request; + + /* + * The response of a pipeline run. + */ + private PipelineRunResponse response; + + /* + * How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed. + */ + private String forceUpdateTag; + + /** + * Creates an instance of PipelineRunProperties class. + */ + public PipelineRunProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of a pipeline run. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the request property: The request parameters for a pipeline run. + * + * @return the request value. + */ + public PipelineRunRequest request() { + return this.request; + } + + /** + * Set the request property: The request parameters for a pipeline run. + * + * @param request the request value to set. + * @return the PipelineRunProperties object itself. + */ + public PipelineRunProperties withRequest(PipelineRunRequest request) { + this.request = request; + return this; + } + + /** + * Get the response property: The response of a pipeline run. + * + * @return the response value. + */ + public PipelineRunResponse response() { + return this.response; + } + + /** + * Get the forceUpdateTag property: How the pipeline run should be forced to recreate even if the pipeline run + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag property: How the pipeline run should be forced to recreate even if the pipeline run + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the PipelineRunProperties object itself. + */ + public PipelineRunProperties withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (request() != null) { + request().validate(); + } + if (response() != null) { + response().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("request", this.request); + jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunProperties 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 PipelineRunProperties. + */ + public static PipelineRunProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunProperties deserializedPipelineRunProperties = new PipelineRunProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedPipelineRunProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("request".equals(fieldName)) { + deserializedPipelineRunProperties.request = PipelineRunRequest.fromJson(reader); + } else if ("response".equals(fieldName)) { + deserializedPipelineRunProperties.response = PipelineRunResponse.fromJson(reader); + } else if ("forceUpdateTag".equals(fieldName)) { + deserializedPipelineRunProperties.forceUpdateTag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunProperties; + }); + } +} 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 2d1c6a4fb2df..81410e07720e 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 @@ -11,13 +11,17 @@ 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.EndpointProtocol; import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.MetadataSearch; import com.azure.resourcemanager.containerregistry.models.NetworkRuleBypassOptions; import com.azure.resourcemanager.containerregistry.models.NetworkRuleSet; import com.azure.resourcemanager.containerregistry.models.Policies; import com.azure.resourcemanager.containerregistry.models.ProvisioningState; import com.azure.resourcemanager.containerregistry.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerregistry.models.RegionalEndpoints; import com.azure.resourcemanager.containerregistry.models.RoleAssignmentMode; import com.azure.resourcemanager.containerregistry.models.Sku; import com.azure.resourcemanager.containerregistry.models.Status; @@ -340,6 +344,64 @@ public List dataEndpointHostNames() { return this.innerProperties() == null ? null : this.innerProperties().dataEndpointHostNames(); } + /** + * Get the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @return the regionalEndpoints value. + */ + public RegionalEndpoints regionalEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().regionalEndpoints(); + } + + /** + * Set the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @param regionalEndpoints the regionalEndpoints value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withRegionalEndpoints(RegionalEndpoints regionalEndpoints) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withRegionalEndpoints(regionalEndpoints); + return this; + } + + /** + * Get the regionalEndpointHostNames property: List of host names that will serve registry when RegionalEndpoints is + * enabled. + * + * @return the regionalEndpointHostNames value. + */ + public List regionalEndpointHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().regionalEndpointHostNames(); + } + + /** + * Get the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @return the endpointProtocol value. + */ + public EndpointProtocol endpointProtocol() { + return this.innerProperties() == null ? null : this.innerProperties().endpointProtocol(); + } + + /** + * Set the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @param endpointProtocol the endpointProtocol value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withEndpointProtocol(EndpointProtocol endpointProtocol) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withEndpointProtocol(endpointProtocol); + return this; + } + /** * Get the privateEndpointConnections property: List of private endpoint connections for a container registry. * @@ -468,6 +530,53 @@ public RegistryInner withAnonymousPullEnabled(Boolean anonymousPullEnabled) { return this; } + /** + * Get the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @return the metadataSearch value. + */ + public MetadataSearch metadataSearch() { + return this.innerProperties() == null ? null : this.innerProperties().metadataSearch(); + } + + /** + * Set the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @param metadataSearch the metadataSearch value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withMetadataSearch(MetadataSearch metadataSearch) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withMetadataSearch(metadataSearch); + 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/RegistryNameStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryNameStatusInner.java index bba22fd5ce7f..0665828111e9 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 @@ -16,6 +16,11 @@ */ @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. */ @@ -37,6 +42,16 @@ public final class RegistryNameStatusInner implements JsonSerializable dataEndpointHostNames; + /* + * Enable per-region endpoints for accessing registry. + */ + private RegionalEndpoints regionalEndpoints; + + /* + * List of host names that will serve registry when RegionalEndpoints is enabled. + */ + private List regionalEndpointHostNames; + + /* + * The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6). + */ + private EndpointProtocol endpointProtocol; + /* * List of private endpoint connections for a container registry. */ @@ -108,6 +127,16 @@ public final class RegistryProperties implements JsonSerializable dataEndpointHostNames() { return this.dataEndpointHostNames; } + /** + * Get the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @return the regionalEndpoints value. + */ + public RegionalEndpoints regionalEndpoints() { + return this.regionalEndpoints; + } + + /** + * Set the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @param regionalEndpoints the regionalEndpoints value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withRegionalEndpoints(RegionalEndpoints regionalEndpoints) { + this.regionalEndpoints = regionalEndpoints; + return this; + } + + /** + * Get the regionalEndpointHostNames property: List of host names that will serve registry when RegionalEndpoints is + * enabled. + * + * @return the regionalEndpointHostNames value. + */ + public List regionalEndpointHostNames() { + return this.regionalEndpointHostNames; + } + + /** + * Get the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @return the endpointProtocol value. + */ + public EndpointProtocol endpointProtocol() { + return this.endpointProtocol; + } + + /** + * Set the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @param endpointProtocol the endpointProtocol value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withEndpointProtocol(EndpointProtocol endpointProtocol) { + this.endpointProtocol = endpointProtocol; + return this; + } + /** * Get the privateEndpointConnections property: List of private endpoint connections for a container registry. * @@ -378,6 +459,47 @@ public RegistryProperties withAnonymousPullEnabled(Boolean anonymousPullEnabled) return this; } + /** + * Get the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @return the metadataSearch value. + */ + public MetadataSearch metadataSearch() { + return this.metadataSearch; + } + + /** + * Set the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @param metadataSearch the metadataSearch value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withMetadataSearch(MetadataSearch metadataSearch) { + this.metadataSearch = metadataSearch; + return this; + } + + /** + * Get the autoGeneratedDomainNameLabelScope property: Determines the domain name label reuse scope. + * + * @return the autoGeneratedDomainNameLabelScope value. + */ + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.autoGeneratedDomainNameLabelScope; + } + + /** + * Set the autoGeneratedDomainNameLabelScope property: Determines the domain name label reuse scope. + * + * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties + withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { + this.autoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; + return this; + } + /** * Get the roleAssignmentMode property: Determines registry role assignment mode. * @@ -432,6 +554,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("policies", this.policies); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); + jsonWriter.writeStringField("regionalEndpoints", + this.regionalEndpoints == null ? null : this.regionalEndpoints.toString()); + jsonWriter.writeStringField("endpointProtocol", + this.endpointProtocol == null ? null : this.endpointProtocol.toString()); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeStringField("networkRuleBypassOptions", @@ -440,6 +566,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("zoneRedundancy", this.zoneRedundancy == null ? null : this.zoneRedundancy.toString()); jsonWriter.writeBooleanField("anonymousPullEnabled", this.anonymousPullEnabled); + jsonWriter.writeStringField("metadataSearch", + this.metadataSearch == null ? null : this.metadataSearch.toString()); + jsonWriter.writeStringField("autoGeneratedDomainNameLabelScope", + this.autoGeneratedDomainNameLabelScope == null ? null : this.autoGeneratedDomainNameLabelScope.toString()); jsonWriter.writeStringField("roleAssignmentMode", this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); return jsonWriter.writeEndObject(); @@ -482,6 +612,13 @@ public static RegistryProperties fromJson(JsonReader jsonReader) throws IOExcept } else if ("dataEndpointHostNames".equals(fieldName)) { List dataEndpointHostNames = reader.readArray(reader1 -> reader1.getString()); deserializedRegistryProperties.dataEndpointHostNames = dataEndpointHostNames; + } else if ("regionalEndpoints".equals(fieldName)) { + deserializedRegistryProperties.regionalEndpoints = RegionalEndpoints.fromString(reader.getString()); + } else if ("regionalEndpointHostNames".equals(fieldName)) { + List regionalEndpointHostNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRegistryProperties.regionalEndpointHostNames = regionalEndpointHostNames; + } else if ("endpointProtocol".equals(fieldName)) { + deserializedRegistryProperties.endpointProtocol = EndpointProtocol.fromString(reader.getString()); } else if ("privateEndpointConnections".equals(fieldName)) { List privateEndpointConnections = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); @@ -499,6 +636,11 @@ public static RegistryProperties fromJson(JsonReader jsonReader) throws IOExcept deserializedRegistryProperties.zoneRedundancy = ZoneRedundancy.fromString(reader.getString()); } else if ("anonymousPullEnabled".equals(fieldName)) { deserializedRegistryProperties.anonymousPullEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("metadataSearch".equals(fieldName)) { + deserializedRegistryProperties.metadataSearch = MetadataSearch.fromString(reader.getString()); + } else if ("autoGeneratedDomainNameLabelScope".equals(fieldName)) { + deserializedRegistryProperties.autoGeneratedDomainNameLabelScope + = AutoGeneratedDomainNameLabelScope.fromString(reader.getString()); } else if ("roleAssignmentMode".equals(fieldName)) { deserializedRegistryProperties.roleAssignmentMode = RoleAssignmentMode.fromString(reader.getString()); diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java index dde7457eaf1f..d1c88bc2c348 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RegistryPropertiesUpdateParameters.java @@ -10,10 +10,13 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerregistry.models.EncryptionProperty; +import com.azure.resourcemanager.containerregistry.models.EndpointProtocol; +import com.azure.resourcemanager.containerregistry.models.MetadataSearch; import com.azure.resourcemanager.containerregistry.models.NetworkRuleBypassOptions; import com.azure.resourcemanager.containerregistry.models.NetworkRuleSet; import com.azure.resourcemanager.containerregistry.models.Policies; import com.azure.resourcemanager.containerregistry.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerregistry.models.RegionalEndpoints; import com.azure.resourcemanager.containerregistry.models.RoleAssignmentMode; import java.io.IOException; @@ -47,6 +50,16 @@ public final class RegistryPropertiesUpdateParameters implements JsonSerializabl */ private Boolean dataEndpointEnabled; + /* + * Enable per-region endpoints for accessing registry. + */ + private RegionalEndpoints regionalEndpoints; + + /* + * The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6). + */ + private EndpointProtocol endpointProtocol; + /* * Whether or not public network access is allowed for the container registry. */ @@ -67,6 +80,11 @@ public final class RegistryPropertiesUpdateParameters implements JsonSerializabl */ private Boolean anonymousPullEnabled; + /* + * Determines whether registry artifacts are indexed for metadata search. + */ + private MetadataSearch metadataSearch; + /* * Determines registry role assignment mode. */ @@ -178,6 +196,48 @@ public RegistryPropertiesUpdateParameters withDataEndpointEnabled(Boolean dataEn return this; } + /** + * Get the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @return the regionalEndpoints value. + */ + public RegionalEndpoints regionalEndpoints() { + return this.regionalEndpoints; + } + + /** + * Set the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @param regionalEndpoints the regionalEndpoints value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withRegionalEndpoints(RegionalEndpoints regionalEndpoints) { + this.regionalEndpoints = regionalEndpoints; + return this; + } + + /** + * Get the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @return the endpointProtocol value. + */ + public EndpointProtocol endpointProtocol() { + return this.endpointProtocol; + } + + /** + * Set the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @param endpointProtocol the endpointProtocol value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withEndpointProtocol(EndpointProtocol endpointProtocol) { + this.endpointProtocol = endpointProtocol; + return this; + } + /** * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. * @@ -264,6 +324,26 @@ public RegistryPropertiesUpdateParameters withAnonymousPullEnabled(Boolean anony return this; } + /** + * Get the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @return the metadataSearch value. + */ + public MetadataSearch metadataSearch() { + return this.metadataSearch; + } + + /** + * Set the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @param metadataSearch the metadataSearch value to set. + * @return the RegistryPropertiesUpdateParameters object itself. + */ + public RegistryPropertiesUpdateParameters withMetadataSearch(MetadataSearch metadataSearch) { + this.metadataSearch = metadataSearch; + return this; + } + /** * Get the roleAssignmentMode property: Determines registry role assignment mode. * @@ -312,12 +392,18 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("policies", this.policies); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeBooleanField("dataEndpointEnabled", this.dataEndpointEnabled); + jsonWriter.writeStringField("regionalEndpoints", + this.regionalEndpoints == null ? null : this.regionalEndpoints.toString()); + jsonWriter.writeStringField("endpointProtocol", + this.endpointProtocol == null ? null : this.endpointProtocol.toString()); 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("metadataSearch", + this.metadataSearch == null ? null : this.metadataSearch.toString()); jsonWriter.writeStringField("roleAssignmentMode", this.roleAssignmentMode == null ? null : this.roleAssignmentMode.toString()); return jsonWriter.writeEndObject(); @@ -351,6 +437,12 @@ public static RegistryPropertiesUpdateParameters fromJson(JsonReader jsonReader) } else if ("dataEndpointEnabled".equals(fieldName)) { deserializedRegistryPropertiesUpdateParameters.dataEndpointEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("regionalEndpoints".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.regionalEndpoints + = RegionalEndpoints.fromString(reader.getString()); + } else if ("endpointProtocol".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.endpointProtocol + = EndpointProtocol.fromString(reader.getString()); } else if ("publicNetworkAccess".equals(fieldName)) { deserializedRegistryPropertiesUpdateParameters.publicNetworkAccess = PublicNetworkAccess.fromString(reader.getString()); @@ -363,6 +455,9 @@ public static RegistryPropertiesUpdateParameters fromJson(JsonReader jsonReader) } else if ("anonymousPullEnabled".equals(fieldName)) { deserializedRegistryPropertiesUpdateParameters.anonymousPullEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("metadataSearch".equals(fieldName)) { + deserializedRegistryPropertiesUpdateParameters.metadataSearch + = MetadataSearch.fromString(reader.getString()); } else if ("roleAssignmentMode".equals(fieldName)) { deserializedRegistryPropertiesUpdateParameters.roleAssignmentMode = RoleAssignmentMode.fromString(reader.getString()); diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchiveVersionsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchiveVersionsClientImpl.java new file mode 100644 index 000000000000..164d9e7bc83b --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchiveVersionsClientImpl.java @@ -0,0 +1,1047 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.implementation; + +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.fluent.ArchiveVersionsClient; +import com.azure.resourcemanager.containerregistry.fluent.models.ArchiveVersionInner; +import com.azure.resourcemanager.containerregistry.implementation.models.ArchiveVersionListResult; +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 ArchiveVersionsClient. + */ +public final class ArchiveVersionsClientImpl implements ArchiveVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ArchiveVersionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ArchiveVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ArchiveVersionsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(ArchiveVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientArchiveVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientArchiveVersions") + public interface ArchiveVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @PathParam("archiveVersionName") String archiveVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @PathParam("archiveVersionName") String archiveVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @PathParam("archiveVersionName") String archiveVersionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @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 archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, packageType, archiveName, + archiveVersionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, packageType, archiveName, archiveVersionName, accept, context); + } + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName) { + return getWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, + context).block(); + } + + /** + * Gets the properties of the archive version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveVersionInner get(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName) { + return getWithResponse(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, + Context.NONE).getValue(); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, packageType, archiveName, + archiveVersionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline 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 packageType, String archiveName, String archiveVersionName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, packageType, archiveName, archiveVersionName, accept, context); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ArchiveVersionInner> beginCreateAsync(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ArchiveVersionInner.class, ArchiveVersionInner.class, this.client.getContext()); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ArchiveVersionInner> beginCreateAsync(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, packageType, + archiveName, archiveVersionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ArchiveVersionInner.class, ArchiveVersionInner.class, context); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArchiveVersionInner> beginCreate(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName) { + return this.beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName) + .getSyncPoller(); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArchiveVersionInner> beginCreate(String resourceGroupName, + String registryName, String packageType, String archiveName, String archiveVersionName, Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context) + .getSyncPoller(); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName) { + return beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName, Context context) { + return beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveVersionInner create(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName) { + return createAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName).block(); + } + + /** + * Creates a archive version for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveVersionInner create(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName, Context context) { + return createAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context) + .block(); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, packageType, archiveName, + archiveVersionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter archiveVersionName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, packageType, + archiveName, archiveVersionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName) { + return this.beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName) + .getSyncPoller(); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String packageType, String archiveName, String archiveVersionName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context) + .getSyncPoller(); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName) { + return beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, String archiveVersionName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName) { + deleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName).block(); + } + + /** + * Deletes a archive version 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveVersionName The name of the archive version 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String packageType, String archiveName, + String archiveVersionName, Context context) { + deleteAsync(resourceGroupName, registryName, packageType, archiveName, archiveVersionName, context).block(); + } + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions 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 packageType, String archiveName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName 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, packageType, archiveName, 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 archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions 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 packageType, String archiveName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName 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, packageType, archiveName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName, String packageType, + String archiveName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, packageType, archiveName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, packageType, archiveName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String packageType, + String archiveName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, packageType, archiveName)); + } + + /** + * Lists all archive versions for the specified container registry, repository type and archive name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, packageType, archiveName, 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 archive versions for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archive versions 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) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchivesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchivesClientImpl.java new file mode 100644 index 000000000000..fe2a24c28539 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchivesClientImpl.java @@ -0,0 +1,1168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.ArchivesClient; +import com.azure.resourcemanager.containerregistry.fluent.models.ArchiveInner; +import com.azure.resourcemanager.containerregistry.implementation.models.ArchiveListResult; +import com.azure.resourcemanager.containerregistry.models.ArchiveUpdateParameters; +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 ArchivesClient. + */ +public final class ArchivesClientImpl implements ArchivesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ArchivesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ArchivesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ArchivesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = RestProxy.create(ArchivesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientArchives to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientArchives") + public interface ArchivesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ArchiveInner archiveCreateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}") + @ExpectedResponses({ 200 }) + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ArchiveUpdateParameters archiveUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}") + @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("packageType") String packageType, @PathParam("archiveName") String archiveName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives") + @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("packageType") String packageType, @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 archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, packageType, archiveName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, packageType, archiveName, accept, context); + } + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, String packageType, + String archiveName) { + return getWithResponseAsync(resourceGroupName, registryName, packageType, archiveName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, context).block(); + } + + /** + * Gets the properties of the archive. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the archive. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveInner get(String resourceGroupName, String registryName, String packageType, String archiveName) { + return getWithResponse(resourceGroupName, registryName, packageType, archiveName, Context.NONE).getValue(); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveCreateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter archiveCreateParameters is required and cannot be null.")); + } else { + archiveCreateParameters.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, packageType, archiveName, contentType, + accept, archiveCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive 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 packageType, String archiveName, ArchiveInner archiveCreateParameters, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveCreateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter archiveCreateParameters is required and cannot be null.")); + } else { + archiveCreateParameters.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, packageType, archiveName, contentType, accept, archiveCreateParameters, + context); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ArchiveInner> beginCreateAsync(String resourceGroupName, + String registryName, String packageType, String archiveName, ArchiveInner archiveCreateParameters) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, packageType, + archiveName, archiveCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ArchiveInner.class, ArchiveInner.class, this.client.getContext()); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ArchiveInner> beginCreateAsync(String resourceGroupName, + String registryName, String packageType, String archiveName, ArchiveInner archiveCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, packageType, + archiveName, archiveCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ArchiveInner.class, ArchiveInner.class, context); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArchiveInner> beginCreate(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArchiveInner> beginCreate(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveInner archiveCreateParameters, Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters, + context) + .getSyncPoller(); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveInner archiveCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveInner archiveCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveInner archiveCreateParameters) { + return createAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters).block(); + } + + /** + * Creates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveCreateParameters The parameters for creating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveInner create(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveInner archiveCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, packageType, archiveName, archiveCreateParameters, context) + .block(); + } + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, ArchiveUpdateParameters archiveUpdateParameters) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter archiveUpdateParameters is required and cannot be null.")); + } else { + archiveUpdateParameters.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, packageType, archiveName, contentType, + accept, archiveUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive 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 packageType, String archiveName, ArchiveUpdateParameters archiveUpdateParameters, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + if (archiveUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter archiveUpdateParameters is required and cannot be null.")); + } else { + archiveUpdateParameters.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, packageType, archiveName, contentType, accept, archiveUpdateParameters, + context); + } + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveUpdateParameters archiveUpdateParameters) { + return updateWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, + archiveUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String registryName, String packageType, + String archiveName, ArchiveUpdateParameters archiveUpdateParameters, Context context) { + return updateWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, + archiveUpdateParameters, context).block(); + } + + /** + * Updates a archive for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param archiveName The name of the archive resource. + * @param archiveUpdateParameters The parameters for updating a archive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a archive for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArchiveInner update(String resourceGroupName, String registryName, String packageType, String archiveName, + ArchiveUpdateParameters archiveUpdateParameters) { + return updateWithResponse(resourceGroupName, registryName, packageType, archiveName, archiveUpdateParameters, + Context.NONE).getValue(); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, packageType, archiveName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType is required and cannot be null.")); + } + if (archiveName == null) { + return Mono.error(new IllegalArgumentException("Parameter archiveName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, packageType, archiveName, context); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, packageType, archiveName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String packageType, String archiveName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, packageType, archiveName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String packageType, String archiveName) { + return this.beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName).getSyncPoller(); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String packageType, String archiveName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, context) + .getSyncPoller(); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String registryName, String packageType, + String archiveName) { + return beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, String packageType, + String archiveName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, packageType, archiveName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String packageType, String archiveName) { + deleteAsync(resourceGroupName, registryName, packageType, archiveName).block(); + } + + /** + * Deletes a archive 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 packageType The package type. + * @param archiveName The name of the archive 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String packageType, String archiveName, + Context context) { + deleteAsync(resourceGroupName, registryName, packageType, archiveName, context).block(); + } + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives 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 packageType) { + 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType 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, packageType, 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 archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives 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 packageType, 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 (packageType == null) { + return Mono.error(new IllegalArgumentException("Parameter packageType 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, packageType, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName, String packageType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, packageType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String packageType, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, packageType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String packageType) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, packageType)); + } + + /** + * Lists all archives for the specified container registry and package type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param packageType The package type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String packageType, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, packageType, 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 archives for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list archives 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) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/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 da81a9709fc6..beab3b44ee70 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 @@ -131,6 +131,16 @@ Mono>> deactivate(@HostParam("endpoint") String endpoi @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("connectedRegistryName") String connectedRegistryName, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> resync(@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" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1451,6 +1461,140 @@ public void deactivate(String resourceGroupName, String registryName, String con deactivateAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); } + /** + * Resync 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 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) + public Mono> resyncWithResponseAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + 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 (connectedRegistryName == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync 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 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> resyncWithResponseAsync(String resourceGroupName, + String registryName, String connectedRegistryName, 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 (connectedRegistryName == null) { + 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.resync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, accept, context); + } + + /** + * Resync 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 an object that represents a connected registry for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resyncAsync(String resourceGroupName, String registryName, + String connectedRegistryName) { + return resyncWithResponseAsync(resourceGroupName, registryName, connectedRegistryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Resync 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 an object that represents a connected registry for a container registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resyncWithResponse(String resourceGroupName, String registryName, + String connectedRegistryName, Context context) { + return resyncWithResponseAsync(resourceGroupName, registryName, connectedRegistryName, context).block(); + } + + /** + * Resync 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 an object that represents a connected registry for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedRegistryInner resync(String resourceGroupName, String registryName, String connectedRegistryName) { + return resyncWithResponse(resourceGroupName, registryName, connectedRegistryName, Context.NONE).getValue(); + } + /** * Get the next page of items. * 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 f31e7349364e..fbd220cfad32 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 @@ -8,11 +8,16 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.containerregistry.fluent.ArchiveVersionsClient; +import com.azure.resourcemanager.containerregistry.fluent.ArchivesClient; import com.azure.resourcemanager.containerregistry.fluent.CacheRulesClient; import com.azure.resourcemanager.containerregistry.fluent.ConnectedRegistriesClient; import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient; import com.azure.resourcemanager.containerregistry.fluent.CredentialSetsClient; +import com.azure.resourcemanager.containerregistry.fluent.ExportPipelinesClient; +import com.azure.resourcemanager.containerregistry.fluent.ImportPipelinesClient; import com.azure.resourcemanager.containerregistry.fluent.OperationsClient; +import com.azure.resourcemanager.containerregistry.fluent.PipelineRunsClient; import com.azure.resourcemanager.containerregistry.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerregistry.fluent.RegistriesClient; import com.azure.resourcemanager.containerregistry.fluent.ReplicationsClient; @@ -140,6 +145,34 @@ public RegistriesClient getRegistries() { return this.registries; } + /** + * The ArchivesClient object to access its operations. + */ + private final ArchivesClient archives; + + /** + * Gets the ArchivesClient object to access its operations. + * + * @return the ArchivesClient object. + */ + public ArchivesClient getArchives() { + return this.archives; + } + + /** + * The ArchiveVersionsClient object to access its operations. + */ + private final ArchiveVersionsClient archiveVersions; + + /** + * Gets the ArchiveVersionsClient object to access its operations. + * + * @return the ArchiveVersionsClient object. + */ + public ArchiveVersionsClient getArchiveVersions() { + return this.archiveVersions; + } + /** * The CacheRulesClient object to access its operations. */ @@ -238,6 +271,48 @@ public TokensClient getTokens() { return this.tokens; } + /** + * The ExportPipelinesClient object to access its operations. + */ + private final ExportPipelinesClient exportPipelines; + + /** + * Gets the ExportPipelinesClient object to access its operations. + * + * @return the ExportPipelinesClient object. + */ + public ExportPipelinesClient getExportPipelines() { + return this.exportPipelines; + } + + /** + * The ImportPipelinesClient object to access its operations. + */ + private final ImportPipelinesClient importPipelines; + + /** + * Gets the ImportPipelinesClient object to access its operations. + * + * @return the ImportPipelinesClient object. + */ + public ImportPipelinesClient getImportPipelines() { + return this.importPipelines; + } + + /** + * The PipelineRunsClient object to access its operations. + */ + private final PipelineRunsClient pipelineRuns; + + /** + * Gets the PipelineRunsClient object to access its operations. + * + * @return the PipelineRunsClient object. + */ + public PipelineRunsClient getPipelineRuns() { + return this.pipelineRuns; + } + /** * The WebhooksClient object to access its operations. */ @@ -270,9 +345,11 @@ public WebhooksClient getWebhooks() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-11-01"; + this.apiVersion = "2026-01-01-preview"; this.operations = new OperationsClientImpl(this); this.registries = new RegistriesClientImpl(this); + this.archives = new ArchivesClientImpl(this); + this.archiveVersions = new ArchiveVersionsClientImpl(this); this.cacheRules = new CacheRulesClientImpl(this); this.credentialSets = new CredentialSetsClientImpl(this); this.connectedRegistries = new ConnectedRegistriesClientImpl(this); @@ -280,6 +357,9 @@ public WebhooksClient getWebhooks() { this.replications = new ReplicationsClientImpl(this); this.scopeMaps = new ScopeMapsClientImpl(this); this.tokens = new TokensClientImpl(this); + this.exportPipelines = new ExportPipelinesClientImpl(this); + this.importPipelines = new ImportPipelinesClientImpl(this); + this.pipelineRuns = new PipelineRunsClientImpl(this); this.webhooks = new WebhooksClientImpl(this); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ExportPipelinesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ExportPipelinesClientImpl.java new file mode 100644 index 000000000000..256b30fe3193 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ExportPipelinesClientImpl.java @@ -0,0 +1,945 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.ExportPipelinesClient; +import com.azure.resourcemanager.containerregistry.fluent.models.ExportPipelineInner; +import com.azure.resourcemanager.containerregistry.implementation.models.ExportPipelineListResult; +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 ExportPipelinesClient. + */ +public final class ExportPipelinesClientImpl implements ExportPipelinesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExportPipelinesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ExportPipelinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExportPipelinesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(ExportPipelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientExportPipelines to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientExportPipelines") + public interface ExportPipelinesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}") + @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("exportPipelineName") String exportPipelineName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}") + @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("exportPipelineName") String exportPipelineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExportPipelineInner exportPipelineCreateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}") + @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("exportPipelineName") String exportPipelineName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines") + @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 export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 export pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName) { + 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, exportPipelineName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 export pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName, 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, exportPipelineName, accept, context); + } + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 export pipeline on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, + String exportPipelineName) { + return getWithResponseAsync(resourceGroupName, registryName, exportPipelineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 export pipeline along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String exportPipelineName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, exportPipelineName, context).block(); + } + + /** + * Gets the properties of the export pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 export pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExportPipelineInner get(String resourceGroupName, String registryName, String exportPipelineName) { + return getWithResponse(resourceGroupName, registryName, exportPipelineName, Context.NONE).getValue(); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters) { + 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + if (exportPipelineCreateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter exportPipelineCreateParameters is required and cannot be null.")); + } else { + exportPipelineCreateParameters.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, exportPipelineName, contentType, + accept, exportPipelineCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline 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 exportPipelineName, ExportPipelineInner exportPipelineCreateParameters, 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + if (exportPipelineCreateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter exportPipelineCreateParameters is required and cannot be null.")); + } else { + exportPipelineCreateParameters.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, exportPipelineName, contentType, accept, exportPipelineCreateParameters, + context); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ExportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + exportPipelineName, exportPipelineCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportPipelineInner.class, ExportPipelineInner.class, this.client.getContext()); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + exportPipelineName, exportPipelineCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportPipelineInner.class, ExportPipelineInner.class, context); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters) { + return this + .beginCreateAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters) + .getSyncPoller(); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an export pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters, + Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters, + context) + .getSyncPoller(); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String registryName, + String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String exportPipelineName, ExportPipelineInner exportPipelineCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExportPipelineInner create(String resourceGroupName, String registryName, String exportPipelineName, + ExportPipelineInner exportPipelineCreateParameters) { + return createAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters).block(); + } + + /** + * Creates an export pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an export pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExportPipelineInner create(String resourceGroupName, String registryName, String exportPipelineName, + ExportPipelineInner exportPipelineCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, exportPipelineName, exportPipelineCreateParameters, context) + .block(); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String exportPipelineName) { + 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, exportPipelineName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 exportPipelineName, 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 (exportPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exportPipelineName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, exportPipelineName, context); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String exportPipelineName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, exportPipelineName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 exportPipelineName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, exportPipelineName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 exportPipelineName) { + return this.beginDeleteAsync(resourceGroupName, registryName, exportPipelineName).getSyncPoller(); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 exportPipelineName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, exportPipelineName, context).getSyncPoller(); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + public Mono deleteAsync(String resourceGroupName, String registryName, String exportPipelineName) { + return beginDeleteAsync(resourceGroupName, registryName, exportPipelineName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 exportPipelineName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, exportPipelineName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 exportPipelineName) { + deleteAsync(resourceGroupName, registryName, exportPipelineName).block(); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 exportPipelineName, Context context) { + deleteAsync(resourceGroupName, registryName, exportPipelineName, context).block(); + } + + /** + * Lists all export pipelines for the 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 export pipelines 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 export pipelines for the specified 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 export pipelines 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 export pipelines for the 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 export pipelines 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 export pipelines for the specified 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 export pipelines 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 export pipelines for the 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 export pipelines 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 export pipelines for the specified 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 export pipelines 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 export pipelines for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list export pipelines 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) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ImportPipelinesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ImportPipelinesClientImpl.java new file mode 100644 index 000000000000..232ea4d14f63 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ImportPipelinesClientImpl.java @@ -0,0 +1,945 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.ImportPipelinesClient; +import com.azure.resourcemanager.containerregistry.fluent.models.ImportPipelineInner; +import com.azure.resourcemanager.containerregistry.implementation.models.ImportPipelineListResult; +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 ImportPipelinesClient. + */ +public final class ImportPipelinesClientImpl implements ImportPipelinesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ImportPipelinesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of ImportPipelinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ImportPipelinesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(ImportPipelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientImportPipelines to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientImportPipelines") + public interface ImportPipelinesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}") + @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("importPipelineName") String importPipelineName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}") + @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("importPipelineName") String importPipelineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ImportPipelineInner importPipelineCreateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}") + @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("importPipelineName") String importPipelineName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines") + @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 import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 import pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName) { + 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, importPipelineName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 import pipeline along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName, 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, importPipelineName, accept, context); + } + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 import pipeline on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, + String importPipelineName) { + return getWithResponseAsync(resourceGroupName, registryName, importPipelineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 import pipeline along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String importPipelineName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, importPipelineName, context).block(); + } + + /** + * Gets the properties of the import pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 import pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ImportPipelineInner get(String resourceGroupName, String registryName, String importPipelineName) { + return getWithResponse(resourceGroupName, registryName, importPipelineName, Context.NONE).getValue(); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName, ImportPipelineInner importPipelineCreateParameters) { + 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + if (importPipelineCreateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter importPipelineCreateParameters is required and cannot be null.")); + } else { + importPipelineCreateParameters.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, importPipelineName, contentType, + accept, importPipelineCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline 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 importPipelineName, ImportPipelineInner importPipelineCreateParameters, 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + if (importPipelineCreateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter importPipelineCreateParameters is required and cannot be null.")); + } else { + importPipelineCreateParameters.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, importPipelineName, contentType, accept, importPipelineCreateParameters, + context); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ImportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters) { + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + importPipelineName, importPipelineCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ImportPipelineInner.class, ImportPipelineInner.class, this.client.getContext()); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ImportPipelineInner> beginCreateAsync(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + importPipelineName, importPipelineCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ImportPipelineInner.class, ImportPipelineInner.class, context); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ImportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters) { + return this + .beginCreateAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters) + .getSyncPoller(); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an import pipeline for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ImportPipelineInner> beginCreate(String resourceGroupName, + String registryName, String importPipelineName, ImportPipelineInner importPipelineCreateParameters, + Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters, + context) + .getSyncPoller(); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String registryName, + String importPipelineName, ImportPipelineInner importPipelineCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, + String importPipelineName, ImportPipelineInner importPipelineCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ImportPipelineInner create(String resourceGroupName, String registryName, String importPipelineName, + ImportPipelineInner importPipelineCreateParameters) { + return createAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters).block(); + } + + /** + * Creates an import pipeline for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents an import pipeline for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ImportPipelineInner create(String resourceGroupName, String registryName, String importPipelineName, + ImportPipelineInner importPipelineCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, importPipelineName, importPipelineCreateParameters, context) + .block(); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String importPipelineName) { + 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, importPipelineName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 importPipelineName, 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 (importPipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter importPipelineName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, importPipelineName, context); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String importPipelineName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, importPipelineName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 importPipelineName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, importPipelineName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 importPipelineName) { + return this.beginDeleteAsync(resourceGroupName, registryName, importPipelineName).getSyncPoller(); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 importPipelineName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, importPipelineName, context).getSyncPoller(); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + public Mono deleteAsync(String resourceGroupName, String registryName, String importPipelineName) { + return beginDeleteAsync(resourceGroupName, registryName, importPipelineName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 importPipelineName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, importPipelineName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 importPipelineName) { + deleteAsync(resourceGroupName, registryName, importPipelineName).block(); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 importPipelineName, Context context) { + deleteAsync(resourceGroupName, registryName, importPipelineName, context).block(); + } + + /** + * Lists all import pipelines for the 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 import pipelines 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 import pipelines for the specified 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 import pipelines 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 import pipelines for the 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 import pipelines 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 import pipelines for the specified 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 import pipelines 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 import pipelines for the 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 import pipelines 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 import pipelines for the specified 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 import pipelines 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 import pipelines for a container registry along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list import pipelines 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) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PipelineRunsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PipelineRunsClientImpl.java new file mode 100644 index 000000000000..da871648bfa6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PipelineRunsClientImpl.java @@ -0,0 +1,934 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.PipelineRunsClient; +import com.azure.resourcemanager.containerregistry.fluent.models.PipelineRunInner; +import com.azure.resourcemanager.containerregistry.implementation.models.PipelineRunListResult; +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 PipelineRunsClient. + */ +public final class PipelineRunsClientImpl implements PipelineRunsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PipelineRunsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of PipelineRunsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PipelineRunsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service + = RestProxy.create(PipelineRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientPipelineRuns to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerRegistryManagementClientPipelineRuns") + public interface PipelineRunsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}") + @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("pipelineRunName") String pipelineRunName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}") + @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("pipelineRunName") String pipelineRunName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PipelineRunInner pipelineRunCreateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}") + @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("pipelineRunName") String pipelineRunName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns") + @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 detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName) { + 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, pipelineRunName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName, 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, pipelineRunName, accept, context); + } + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, String pipelineRunName) { + return getWithResponseAsync(resourceGroupName, registryName, pipelineRunName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String pipelineRunName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, pipelineRunName, context).block(); + } + + /** + * Gets the detailed information for a given pipeline run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the detailed information for a given pipeline run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineRunInner get(String resourceGroupName, String registryName, String pipelineRunName) { + return getWithResponse(resourceGroupName, registryName, pipelineRunName, Context.NONE).getValue(); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName, PipelineRunInner pipelineRunCreateParameters) { + 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + if (pipelineRunCreateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter pipelineRunCreateParameters is required and cannot be null.")); + } else { + pipelineRunCreateParameters.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, pipelineRunName, contentType, accept, + pipelineRunCreateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run 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 pipelineRunName, PipelineRunInner pipelineRunCreateParameters, 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + if (pipelineRunCreateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter pipelineRunCreateParameters is required and cannot be null.")); + } else { + pipelineRunCreateParameters.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, pipelineRunName, contentType, accept, pipelineRunCreateParameters, + context); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PipelineRunInner> beginCreateAsync(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PipelineRunInner.class, PipelineRunInner.class, this.client.getContext()); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PipelineRunInner> beginCreateAsync(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, registryName, + pipelineRunName, pipelineRunCreateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PipelineRunInner.class, PipelineRunInner.class, context); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PipelineRunInner> beginCreate(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters) { + return this.beginCreateAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PipelineRunInner> beginCreate(String resourceGroupName, + String registryName, String pipelineRunName, PipelineRunInner pipelineRunCreateParameters, Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters, Context context) { + return beginCreateAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineRunInner create(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters) { + return createAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters).block(); + } + + /** + * Creates a pipeline run for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a pipeline run for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineRunInner create(String resourceGroupName, String registryName, String pipelineRunName, + PipelineRunInner pipelineRunCreateParameters, Context context) { + return createAsync(resourceGroupName, registryName, pipelineRunName, pipelineRunCreateParameters, context) + .block(); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String pipelineRunName) { + 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, pipelineRunName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipelineRunName, 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 (pipelineRunName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineRunName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, pipelineRunName, context); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String pipelineRunName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, pipelineRunName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipelineRunName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, pipelineRunName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipelineRunName) { + return this.beginDeleteAsync(resourceGroupName, registryName, pipelineRunName).getSyncPoller(); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 pipelineRunName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, pipelineRunName, context).getSyncPoller(); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + public Mono deleteAsync(String resourceGroupName, String registryName, String pipelineRunName) { + return beginDeleteAsync(resourceGroupName, registryName, pipelineRunName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 pipelineRunName, + Context context) { + return beginDeleteAsync(resourceGroupName, registryName, pipelineRunName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 pipelineRunName) { + deleteAsync(resourceGroupName, registryName, pipelineRunName).block(); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 pipelineRunName, Context context) { + deleteAsync(resourceGroupName, registryName, pipelineRunName, context).block(); + } + + /** + * Lists all the pipeline runs for the 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 pipeline runs 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 pipeline runs for the specified 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 pipeline runs 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 pipeline runs for the 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 pipeline runs 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 pipeline runs for the specified 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 pipeline runs 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 pipeline runs for the 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 pipeline runs 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 pipeline runs for the specified 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 pipeline runs 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 pipeline runs for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list pipeline runs 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) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveListResult.java new file mode 100644 index 000000000000..2d52b4c601f8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveListResult.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.models.ArchiveInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list archives for a container registry. + */ +@Immutable +public final class ArchiveListResult implements JsonSerializable { + /* + * The list of archives. Since this list may be incomplete, the nextLink field should be used to request the next + * list of archives. + */ + private List value; + + /* + * The URI that can be used to request the next list of archives. + */ + private String nextLink; + + /** + * Creates an instance of ArchiveListResult class. + */ + private ArchiveListResult() { + } + + /** + * Get the value property: The list of archives. Since this list may be incomplete, the nextLink field should be + * used to request the next list of archives. + * + * @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 archives. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 ArchiveListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveListResult 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 ArchiveListResult. + */ + public static ArchiveListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveListResult deserializedArchiveListResult = new ArchiveListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ArchiveInner.fromJson(reader1)); + deserializedArchiveListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedArchiveListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveVersionListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveVersionListResult.java new file mode 100644 index 000000000000..87a1808b66a2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveVersionListResult.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.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.fluent.models.ArchiveVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list archive versions for a container registry. + */ +@Immutable +public final class ArchiveVersionListResult implements JsonSerializable { + /* + * The list of archive versions. Since this list may be incomplete, the nextLink field should be used to request the + * next list of archive versions. + */ + private List value; + + /* + * The URI that can be used to request the next list of archive versions. + */ + private String nextLink; + + /** + * Creates an instance of ArchiveVersionListResult class. + */ + private ArchiveVersionListResult() { + } + + /** + * Get the value property: The list of archive versions. Since this list may be incomplete, the nextLink field + * should be used to request the next list of archive versions. + * + * @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 archive versions. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 ArchiveVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveVersionListResult 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 ArchiveVersionListResult. + */ + public static ArchiveVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveVersionListResult deserializedArchiveVersionListResult = new ArchiveVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ArchiveVersionInner.fromJson(reader1)); + deserializedArchiveVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedArchiveVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveVersionListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ExportPipelineListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ExportPipelineListResult.java new file mode 100644 index 000000000000..943830547491 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ExportPipelineListResult.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.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.fluent.models.ExportPipelineInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list export pipelines for a container registry. + */ +@Immutable +public final class ExportPipelineListResult implements JsonSerializable { + /* + * The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the + * next list of export pipelines. + */ + private List value; + + /* + * The URI that can be used to request the next list of export pipelines. + */ + private String nextLink; + + /** + * Creates an instance of ExportPipelineListResult class. + */ + private ExportPipelineListResult() { + } + + /** + * Get the value property: The list of export pipelines. Since this list may be incomplete, the nextLink field + * should be used to request the next list of export pipelines. + * + * @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 export pipelines. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 ExportPipelineListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPipelineListResult 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 ExportPipelineListResult. + */ + public static ExportPipelineListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPipelineListResult deserializedExportPipelineListResult = new ExportPipelineListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExportPipelineInner.fromJson(reader1)); + deserializedExportPipelineListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExportPipelineListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPipelineListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ImportPipelineListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ImportPipelineListResult.java new file mode 100644 index 000000000000..0dd48ac8f00a --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ImportPipelineListResult.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.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.fluent.models.ImportPipelineInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list import pipelines for a container registry. + */ +@Immutable +public final class ImportPipelineListResult implements JsonSerializable { + /* + * The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the + * next list of import pipelines. + */ + private List value; + + /* + * The URI that can be used to request the next list of import pipelines. + */ + private String nextLink; + + /** + * Creates an instance of ImportPipelineListResult class. + */ + private ImportPipelineListResult() { + } + + /** + * Get the value property: The list of import pipelines. Since this list may be incomplete, the nextLink field + * should be used to request the next list of import pipelines. + * + * @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 import pipelines. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 ImportPipelineListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportPipelineListResult 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 ImportPipelineListResult. + */ + public static ImportPipelineListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportPipelineListResult deserializedImportPipelineListResult = new ImportPipelineListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ImportPipelineInner.fromJson(reader1)); + deserializedImportPipelineListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedImportPipelineListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportPipelineListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PipelineRunListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PipelineRunListResult.java new file mode 100644 index 000000000000..bac23c055d38 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PipelineRunListResult.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerregistry.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.fluent.models.PipelineRunInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list pipeline runs for a container registry. + */ +@Immutable +public final class PipelineRunListResult implements JsonSerializable { + /* + * The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the + * next list of pipeline runs. + */ + private List value; + + /* + * The URI that can be used to request the next list of pipeline runs. + */ + private String nextLink; + + /** + * Creates an instance of PipelineRunListResult class. + */ + private PipelineRunListResult() { + } + + /** + * Get the value property: The list of pipeline runs. Since this list may be incomplete, the nextLink field should + * be used to request the next list of pipeline runs. + * + * @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 pipeline runs. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 PipelineRunListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunListResult 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 PipelineRunListResult. + */ + public static PipelineRunListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunListResult deserializedPipelineRunListResult = new PipelineRunListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PipelineRunInner.fromJson(reader1)); + deserializedPipelineRunListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPipelineRunListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunListResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchivePackageSourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchivePackageSourceProperties.java new file mode 100644 index 000000000000..fd3c0b7381da --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchivePackageSourceProperties.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.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 archive package source. + */ +@Fluent +public final class ArchivePackageSourceProperties implements JsonSerializable { + /* + * The type of package source for a archive. + */ + private PackageSourceType type; + + /* + * The external repository url. + */ + private String url; + + /** + * Creates an instance of ArchivePackageSourceProperties class. + */ + public ArchivePackageSourceProperties() { + } + + /** + * Get the type property: The type of package source for a archive. + * + * @return the type value. + */ + public PackageSourceType type() { + return this.type; + } + + /** + * Set the type property: The type of package source for a archive. + * + * @param type the type value to set. + * @return the ArchivePackageSourceProperties object itself. + */ + public ArchivePackageSourceProperties withType(PackageSourceType type) { + this.type = type; + return this; + } + + /** + * Get the url property: The external repository url. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The external repository url. + * + * @param url the url value to set. + * @return the ArchivePackageSourceProperties object itself. + */ + public ArchivePackageSourceProperties withUrl(String url) { + this.url = url; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchivePackageSourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchivePackageSourceProperties 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 ArchivePackageSourceProperties. + */ + public static ArchivePackageSourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchivePackageSourceProperties deserializedArchivePackageSourceProperties + = new ArchivePackageSourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedArchivePackageSourceProperties.type = PackageSourceType.fromString(reader.getString()); + } else if ("url".equals(fieldName)) { + deserializedArchivePackageSourceProperties.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedArchivePackageSourceProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchiveUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchiveUpdateParameters.java new file mode 100644 index 000000000000..695aea103456 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ArchiveUpdateParameters.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.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.fluent.models.ArchiveUpdateProperties; +import java.io.IOException; + +/** + * The parameters for updating a archive. + */ +@Fluent +public final class ArchiveUpdateParameters implements JsonSerializable { + /* + * The properties of the connected registry update parameters. + */ + private ArchiveUpdateProperties innerProperties; + + /** + * Creates an instance of ArchiveUpdateParameters class. + */ + public ArchiveUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the connected registry update parameters. + * + * @return the innerProperties value. + */ + private ArchiveUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the publishedVersion property: The published version of the archive. + * + * @return the publishedVersion value. + */ + public String publishedVersion() { + return this.innerProperties() == null ? null : this.innerProperties().publishedVersion(); + } + + /** + * Set the publishedVersion property: The published version of the archive. + * + * @param publishedVersion the publishedVersion value to set. + * @return the ArchiveUpdateParameters object itself. + */ + public ArchiveUpdateParameters withPublishedVersion(String publishedVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ArchiveUpdateProperties(); + } + this.innerProperties().withPublishedVersion(publishedVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArchiveUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArchiveUpdateParameters 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 ArchiveUpdateParameters. + */ + public static ArchiveUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArchiveUpdateParameters deserializedArchiveUpdateParameters = new ArchiveUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedArchiveUpdateParameters.innerProperties = ArchiveUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedArchiveUpdateParameters; + }); + } +} 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 new file mode 100644 index 000000000000..e45a54b0d6c2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AutoGeneratedDomainNameLabelScope.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.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/CacheRuleUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java index fef5626491fa..99fb8ba0f1e1 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 @@ -22,6 +22,11 @@ public final class CacheRuleUpdateParameters implements JsonSerializable { + /** + * IPv4 connectivity only. + */ + public static final EndpointProtocol IPV4 = fromString("IPv4"); + + /** + * IPv4 and IPv6 (dual stack) connectivity. + */ + public static final EndpointProtocol IPV4AND_IPV6 = fromString("IPv4AndIPv6"); + + /** + * Creates a new instance of EndpointProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointProtocol() { + } + + /** + * Creates or finds a EndpointProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointProtocol. + */ + public static EndpointProtocol fromString(String name) { + return fromString(name, EndpointProtocol.class); + } + + /** + * Gets known EndpointProtocol values. + * + * @return known EndpointProtocol values. + */ + public static Collection values() { + return values(EndpointProtocol.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPipelineTargetProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPipelineTargetProperties.java new file mode 100644 index 000000000000..3772f3297737 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ExportPipelineTargetProperties.java @@ -0,0 +1,186 @@ +// Copyright (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; + +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 export pipeline target. + */ +@Fluent +public final class ExportPipelineTargetProperties implements JsonSerializable { + /* + * The type of target for the export pipeline. + */ + private String type; + + /* + * The target uri of the export pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + private String uri; + + /* + * They key vault secret uri to obtain the target storage SAS token. + */ + private String keyVaultUri; + + /* + * The storage access mode used for the customer storage account. + */ + private StorageAccessMode storageAccessMode; + + /** + * Creates an instance of ExportPipelineTargetProperties class. + */ + public ExportPipelineTargetProperties() { + } + + /** + * Get the type property: The type of target for the export pipeline. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of target for the export pipeline. + * + * @param type the type value to set. + * @return the ExportPipelineTargetProperties object itself. + */ + public ExportPipelineTargetProperties withType(String type) { + this.type = type; + return this; + } + + /** + * Get the uri property: The target uri of the export pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The target uri of the export pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + * + * @param uri the uri value to set. + * @return the ExportPipelineTargetProperties object itself. + */ + public ExportPipelineTargetProperties withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the keyVaultUri property: They key vault secret uri to obtain the target storage SAS token. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: They key vault secret uri to obtain the target storage SAS token. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ExportPipelineTargetProperties object itself. + */ + public ExportPipelineTargetProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the storageAccessMode property: The storage access mode used for the customer storage account. + * + * @return the storageAccessMode value. + */ + public StorageAccessMode storageAccessMode() { + return this.storageAccessMode; + } + + /** + * Set the storageAccessMode property: The storage access mode used for the customer storage account. + * + * @param storageAccessMode the storageAccessMode value to set. + * @return the ExportPipelineTargetProperties object itself. + */ + public ExportPipelineTargetProperties withStorageAccessMode(StorageAccessMode storageAccessMode) { + this.storageAccessMode = storageAccessMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("storageAccessMode", + this.storageAccessMode == null ? null : this.storageAccessMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportPipelineTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPipelineTargetProperties 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 ExportPipelineTargetProperties. + */ + public static ExportPipelineTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPipelineTargetProperties deserializedExportPipelineTargetProperties + = new ExportPipelineTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedExportPipelineTargetProperties.type = reader.getString(); + } else if ("uri".equals(fieldName)) { + deserializedExportPipelineTargetProperties.uri = reader.getString(); + } else if ("keyVaultUri".equals(fieldName)) { + deserializedExportPipelineTargetProperties.keyVaultUri = reader.getString(); + } else if ("storageAccessMode".equals(fieldName)) { + deserializedExportPipelineTargetProperties.storageAccessMode + = StorageAccessMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPipelineTargetProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportPipelineSourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportPipelineSourceProperties.java new file mode 100644 index 000000000000..83e3d3cc25b3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImportPipelineSourceProperties.java @@ -0,0 +1,186 @@ +// Copyright (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; + +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 import pipeline source. + */ +@Fluent +public final class ImportPipelineSourceProperties implements JsonSerializable { + /* + * The type of source for the import pipeline. + */ + private PipelineSourceType type; + + /* + * The source uri of the import pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + private String uri; + + /* + * They key vault secret uri to obtain the source storage SAS token. + */ + private String keyVaultUri; + + /* + * The storage access mode used for the customer storage account. + */ + private StorageAccessMode storageAccessMode; + + /** + * Creates an instance of ImportPipelineSourceProperties class. + */ + public ImportPipelineSourceProperties() { + } + + /** + * Get the type property: The type of source for the import pipeline. + * + * @return the type value. + */ + public PipelineSourceType type() { + return this.type; + } + + /** + * Set the type property: The type of source for the import pipeline. + * + * @param type the type value to set. + * @return the ImportPipelineSourceProperties object itself. + */ + public ImportPipelineSourceProperties withType(PipelineSourceType type) { + this.type = type; + return this; + } + + /** + * Get the uri property: The source uri of the import pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The source uri of the import pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + * + * @param uri the uri value to set. + * @return the ImportPipelineSourceProperties object itself. + */ + public ImportPipelineSourceProperties withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the keyVaultUri property: They key vault secret uri to obtain the source storage SAS token. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: They key vault secret uri to obtain the source storage SAS token. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ImportPipelineSourceProperties object itself. + */ + public ImportPipelineSourceProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the storageAccessMode property: The storage access mode used for the customer storage account. + * + * @return the storageAccessMode value. + */ + public StorageAccessMode storageAccessMode() { + return this.storageAccessMode; + } + + /** + * Set the storageAccessMode property: The storage access mode used for the customer storage account. + * + * @param storageAccessMode the storageAccessMode value to set. + * @return the ImportPipelineSourceProperties object itself. + */ + public ImportPipelineSourceProperties withStorageAccessMode(StorageAccessMode storageAccessMode) { + this.storageAccessMode = storageAccessMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("storageAccessMode", + this.storageAccessMode == null ? null : this.storageAccessMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportPipelineSourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportPipelineSourceProperties 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 ImportPipelineSourceProperties. + */ + public static ImportPipelineSourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportPipelineSourceProperties deserializedImportPipelineSourceProperties + = new ImportPipelineSourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedImportPipelineSourceProperties.type = PipelineSourceType.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedImportPipelineSourceProperties.uri = reader.getString(); + } else if ("keyVaultUri".equals(fieldName)) { + deserializedImportPipelineSourceProperties.keyVaultUri = reader.getString(); + } else if ("storageAccessMode".equals(fieldName)) { + deserializedImportPipelineSourceProperties.storageAccessMode + = StorageAccessMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedImportPipelineSourceProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/MetadataSearch.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/MetadataSearch.java new file mode 100644 index 000000000000..84e62259c99f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/MetadataSearch.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; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Determines whether registry artifacts are indexed for metadata search. + */ +public final class MetadataSearch extends ExpandableStringEnum { + /** + * Static value Enabled for MetadataSearch. + */ + public static final MetadataSearch ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MetadataSearch. + */ + public static final MetadataSearch DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MetadataSearch value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MetadataSearch() { + } + + /** + * Creates or finds a MetadataSearch from its string representation. + * + * @param name a name to look for. + * @return the corresponding MetadataSearch. + */ + public static MetadataSearch fromString(String name) { + return fromString(name, MetadataSearch.class); + } + + /** + * Gets known MetadataSearch values. + * + * @return known MetadataSearch values. + */ + public static Collection values() { + return values(MetadataSearch.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PackageSourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PackageSourceType.java new file mode 100644 index 000000000000..b8ba8ace9692 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PackageSourceType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of package source for a archive. + */ +public final class PackageSourceType extends ExpandableStringEnum { + /** + * Static value remote for PackageSourceType. + */ + public static final PackageSourceType REMOTE = fromString("remote"); + + /** + * Creates a new instance of PackageSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageSourceType() { + } + + /** + * Creates or finds a PackageSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageSourceType. + */ + public static PackageSourceType fromString(String name) { + return fromString(name, PackageSourceType.class); + } + + /** + * Gets known PackageSourceType values. + * + * @return known PackageSourceType values. + */ + public static Collection values() { + return values(PackageSourceType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineOptions.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineOptions.java new file mode 100644 index 000000000000..dfb39f55e941 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineOptions.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for PipelineOptions. + */ +public final class PipelineOptions extends ExpandableStringEnum { + /** + * Static value OverwriteTags for PipelineOptions. + */ + public static final PipelineOptions OVERWRITE_TAGS = fromString("OverwriteTags"); + + /** + * Static value OverwriteBlobs for PipelineOptions. + */ + public static final PipelineOptions OVERWRITE_BLOBS = fromString("OverwriteBlobs"); + + /** + * Static value DeleteSourceBlobOnSuccess for PipelineOptions. + */ + public static final PipelineOptions DELETE_SOURCE_BLOB_ON_SUCCESS = fromString("DeleteSourceBlobOnSuccess"); + + /** + * Static value ContinueOnErrors for PipelineOptions. + */ + public static final PipelineOptions CONTINUE_ON_ERRORS = fromString("ContinueOnErrors"); + + /** + * Creates a new instance of PipelineOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PipelineOptions() { + } + + /** + * Creates or finds a PipelineOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding PipelineOptions. + */ + public static PipelineOptions fromString(String name) { + return fromString(name, PipelineOptions.class); + } + + /** + * Gets known PipelineOptions values. + * + * @return known PipelineOptions values. + */ + public static Collection values() { + return values(PipelineOptions.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunRequest.java new file mode 100644 index 000000000000..a694bbc0960c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunRequest.java @@ -0,0 +1,222 @@ +// Copyright (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; + +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 request properties provided for a pipeline run. + */ +@Fluent +public final class PipelineRunRequest implements JsonSerializable { + /* + * The resource ID of the pipeline to run. + */ + private String pipelineResourceId; + + /* + * List of source artifacts to be transferred by the pipeline. + * 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 List artifacts; + + /* + * The source properties of the pipeline run. + */ + private PipelineRunSourceProperties source; + + /* + * The target properties of the pipeline run. + */ + private PipelineRunTargetProperties target; + + /* + * The digest of the tar used to transfer the artifacts. + */ + private String catalogDigest; + + /** + * Creates an instance of PipelineRunRequest class. + */ + public PipelineRunRequest() { + } + + /** + * Get the pipelineResourceId property: The resource ID of the pipeline to run. + * + * @return the pipelineResourceId value. + */ + public String pipelineResourceId() { + return this.pipelineResourceId; + } + + /** + * Set the pipelineResourceId property: The resource ID of the pipeline to run. + * + * @param pipelineResourceId the pipelineResourceId value to set. + * @return the PipelineRunRequest object itself. + */ + public PipelineRunRequest withPipelineResourceId(String pipelineResourceId) { + this.pipelineResourceId = pipelineResourceId; + return this; + } + + /** + * Get the artifacts property: List of source artifacts to be transferred by the pipeline. + * 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 artifacts value. + */ + public List artifacts() { + return this.artifacts; + } + + /** + * Set the artifacts property: List of source artifacts to be transferred by the pipeline. + * 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 artifacts the artifacts value to set. + * @return the PipelineRunRequest object itself. + */ + public PipelineRunRequest withArtifacts(List artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * Get the source property: The source properties of the pipeline run. + * + * @return the source value. + */ + public PipelineRunSourceProperties source() { + return this.source; + } + + /** + * Set the source property: The source properties of the pipeline run. + * + * @param source the source value to set. + * @return the PipelineRunRequest object itself. + */ + public PipelineRunRequest withSource(PipelineRunSourceProperties source) { + this.source = source; + return this; + } + + /** + * Get the target property: The target properties of the pipeline run. + * + * @return the target value. + */ + public PipelineRunTargetProperties target() { + return this.target; + } + + /** + * Set the target property: The target properties of the pipeline run. + * + * @param target the target value to set. + * @return the PipelineRunRequest object itself. + */ + public PipelineRunRequest withTarget(PipelineRunTargetProperties target) { + this.target = target; + return this; + } + + /** + * Get the catalogDigest property: The digest of the tar used to transfer the artifacts. + * + * @return the catalogDigest value. + */ + public String catalogDigest() { + return this.catalogDigest; + } + + /** + * Set the catalogDigest property: The digest of the tar used to transfer the artifacts. + * + * @param catalogDigest the catalogDigest value to set. + * @return the PipelineRunRequest object itself. + */ + public PipelineRunRequest withCatalogDigest(String catalogDigest) { + this.catalogDigest = catalogDigest; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (source() != null) { + source().validate(); + } + if (target() != null) { + target().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("pipelineResourceId", this.pipelineResourceId); + jsonWriter.writeArrayField("artifacts", this.artifacts, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("source", this.source); + jsonWriter.writeJsonField("target", this.target); + jsonWriter.writeStringField("catalogDigest", this.catalogDigest); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunRequest 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 PipelineRunRequest. + */ + public static PipelineRunRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunRequest deserializedPipelineRunRequest = new PipelineRunRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("pipelineResourceId".equals(fieldName)) { + deserializedPipelineRunRequest.pipelineResourceId = reader.getString(); + } else if ("artifacts".equals(fieldName)) { + List artifacts = reader.readArray(reader1 -> reader1.getString()); + deserializedPipelineRunRequest.artifacts = artifacts; + } else if ("source".equals(fieldName)) { + deserializedPipelineRunRequest.source = PipelineRunSourceProperties.fromJson(reader); + } else if ("target".equals(fieldName)) { + deserializedPipelineRunRequest.target = PipelineRunTargetProperties.fromJson(reader); + } else if ("catalogDigest".equals(fieldName)) { + deserializedPipelineRunRequest.catalogDigest = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunRequest; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunResponse.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunResponse.java new file mode 100644 index 000000000000..40099640767c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunResponse.java @@ -0,0 +1,257 @@ +// Copyright (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; + +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; +import java.util.List; + +/** + * The response properties returned for a pipeline run. + */ +@Immutable +public final class PipelineRunResponse implements JsonSerializable { + /* + * The current status of the pipeline run. + */ + private String status; + + /* + * The artifacts imported in the pipeline run. + */ + private List importedArtifacts; + + /* + * The current progress of the copy operation. + */ + private ProgressProperties progress; + + /* + * The time the pipeline run started. + */ + private OffsetDateTime startTime; + + /* + * The time the pipeline run finished. + */ + private OffsetDateTime finishTime; + + /* + * The source of the pipeline run. + */ + private ImportPipelineSourceProperties source; + + /* + * The target of the pipeline run. + */ + private ExportPipelineTargetProperties target; + + /* + * The digest of the tar used to transfer the artifacts. + */ + private String catalogDigest; + + /* + * The trigger that caused the pipeline run. + */ + private PipelineTriggerDescriptor trigger; + + /* + * The detailed error message for the pipeline run in the case of failure. + */ + private String pipelineRunErrorMessage; + + /** + * Creates an instance of PipelineRunResponse class. + */ + private PipelineRunResponse() { + } + + /** + * Get the status property: The current status of the pipeline run. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the importedArtifacts property: The artifacts imported in the pipeline run. + * + * @return the importedArtifacts value. + */ + public List importedArtifacts() { + return this.importedArtifacts; + } + + /** + * Get the progress property: The current progress of the copy operation. + * + * @return the progress value. + */ + public ProgressProperties progress() { + return this.progress; + } + + /** + * Get the startTime property: The time the pipeline run started. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the finishTime property: The time the pipeline run finished. + * + * @return the finishTime value. + */ + public OffsetDateTime finishTime() { + return this.finishTime; + } + + /** + * Get the source property: The source of the pipeline run. + * + * @return the source value. + */ + public ImportPipelineSourceProperties source() { + return this.source; + } + + /** + * Get the target property: The target of the pipeline run. + * + * @return the target value. + */ + public ExportPipelineTargetProperties target() { + return this.target; + } + + /** + * Get the catalogDigest property: The digest of the tar used to transfer the artifacts. + * + * @return the catalogDigest value. + */ + public String catalogDigest() { + return this.catalogDigest; + } + + /** + * Get the trigger property: The trigger that caused the pipeline run. + * + * @return the trigger value. + */ + public PipelineTriggerDescriptor trigger() { + return this.trigger; + } + + /** + * Get the pipelineRunErrorMessage property: The detailed error message for the pipeline run in the case of failure. + * + * @return the pipelineRunErrorMessage value. + */ + public String pipelineRunErrorMessage() { + return this.pipelineRunErrorMessage; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (progress() != null) { + progress().validate(); + } + if (source() != null) { + source().validate(); + } + if (target() != null) { + target().validate(); + } + if (trigger() != null) { + trigger().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeArrayField("importedArtifacts", this.importedArtifacts, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("progress", this.progress); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("finishTime", + this.finishTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.finishTime)); + jsonWriter.writeJsonField("source", this.source); + jsonWriter.writeJsonField("target", this.target); + jsonWriter.writeStringField("catalogDigest", this.catalogDigest); + jsonWriter.writeJsonField("trigger", this.trigger); + jsonWriter.writeStringField("pipelineRunErrorMessage", this.pipelineRunErrorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunResponse 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 PipelineRunResponse. + */ + public static PipelineRunResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunResponse deserializedPipelineRunResponse = new PipelineRunResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPipelineRunResponse.status = reader.getString(); + } else if ("importedArtifacts".equals(fieldName)) { + List importedArtifacts = reader.readArray(reader1 -> reader1.getString()); + deserializedPipelineRunResponse.importedArtifacts = importedArtifacts; + } else if ("progress".equals(fieldName)) { + deserializedPipelineRunResponse.progress = ProgressProperties.fromJson(reader); + } else if ("startTime".equals(fieldName)) { + deserializedPipelineRunResponse.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("finishTime".equals(fieldName)) { + deserializedPipelineRunResponse.finishTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("source".equals(fieldName)) { + deserializedPipelineRunResponse.source = ImportPipelineSourceProperties.fromJson(reader); + } else if ("target".equals(fieldName)) { + deserializedPipelineRunResponse.target = ExportPipelineTargetProperties.fromJson(reader); + } else if ("catalogDigest".equals(fieldName)) { + deserializedPipelineRunResponse.catalogDigest = reader.getString(); + } else if ("trigger".equals(fieldName)) { + deserializedPipelineRunResponse.trigger = PipelineTriggerDescriptor.fromJson(reader); + } else if ("pipelineRunErrorMessage".equals(fieldName)) { + deserializedPipelineRunResponse.pipelineRunErrorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunResponse; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceProperties.java new file mode 100644 index 000000000000..3ef4af0290ff --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceProperties.java @@ -0,0 +1,121 @@ +// Copyright (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; + +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 pipeline run source properties. + */ +@Fluent +public final class PipelineRunSourceProperties implements JsonSerializable { + /* + * The type of the source. + */ + private PipelineRunSourceType type; + + /* + * The name of the source. + */ + private String name; + + /** + * Creates an instance of PipelineRunSourceProperties class. + */ + public PipelineRunSourceProperties() { + } + + /** + * Get the type property: The type of the source. + * + * @return the type value. + */ + public PipelineRunSourceType type() { + return this.type; + } + + /** + * Set the type property: The type of the source. + * + * @param type the type value to set. + * @return the PipelineRunSourceProperties object itself. + */ + public PipelineRunSourceProperties withType(PipelineRunSourceType type) { + this.type = type; + return this; + } + + /** + * Get the name property: The name of the source. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the source. + * + * @param name the name value to set. + * @return the PipelineRunSourceProperties object itself. + */ + public PipelineRunSourceProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunSourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunSourceProperties 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 PipelineRunSourceProperties. + */ + public static PipelineRunSourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunSourceProperties deserializedPipelineRunSourceProperties = new PipelineRunSourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPipelineRunSourceProperties.type = PipelineRunSourceType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedPipelineRunSourceProperties.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunSourceProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceType.java new file mode 100644 index 000000000000..5383eb7e214c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the source. + */ +public final class PipelineRunSourceType extends ExpandableStringEnum { + /** + * Static value AzureStorageBlob for PipelineRunSourceType. + */ + public static final PipelineRunSourceType AZURE_STORAGE_BLOB = fromString("AzureStorageBlob"); + + /** + * Creates a new instance of PipelineRunSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PipelineRunSourceType() { + } + + /** + * Creates or finds a PipelineRunSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PipelineRunSourceType. + */ + public static PipelineRunSourceType fromString(String name) { + return fromString(name, PipelineRunSourceType.class); + } + + /** + * Gets known PipelineRunSourceType values. + * + * @return known PipelineRunSourceType values. + */ + public static Collection values() { + return values(PipelineRunSourceType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetProperties.java new file mode 100644 index 000000000000..1e0c082249b2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetProperties.java @@ -0,0 +1,121 @@ +// Copyright (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; + +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 pipeline run target properties. + */ +@Fluent +public final class PipelineRunTargetProperties implements JsonSerializable { + /* + * The type of the target. + */ + private PipelineRunTargetType type; + + /* + * The name of the target. + */ + private String name; + + /** + * Creates an instance of PipelineRunTargetProperties class. + */ + public PipelineRunTargetProperties() { + } + + /** + * Get the type property: The type of the target. + * + * @return the type value. + */ + public PipelineRunTargetType type() { + return this.type; + } + + /** + * Set the type property: The type of the target. + * + * @param type the type value to set. + * @return the PipelineRunTargetProperties object itself. + */ + public PipelineRunTargetProperties withType(PipelineRunTargetType type) { + this.type = type; + return this; + } + + /** + * Get the name property: The name of the target. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the target. + * + * @param name the name value to set. + * @return the PipelineRunTargetProperties object itself. + */ + public PipelineRunTargetProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineRunTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineRunTargetProperties 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 PipelineRunTargetProperties. + */ + public static PipelineRunTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineRunTargetProperties deserializedPipelineRunTargetProperties = new PipelineRunTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPipelineRunTargetProperties.type = PipelineRunTargetType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedPipelineRunTargetProperties.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineRunTargetProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetType.java new file mode 100644 index 000000000000..89abce60eaf5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the target. + */ +public final class PipelineRunTargetType extends ExpandableStringEnum { + /** + * Static value AzureStorageBlob for PipelineRunTargetType. + */ + public static final PipelineRunTargetType AZURE_STORAGE_BLOB = fromString("AzureStorageBlob"); + + /** + * Creates a new instance of PipelineRunTargetType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PipelineRunTargetType() { + } + + /** + * Creates or finds a PipelineRunTargetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PipelineRunTargetType. + */ + public static PipelineRunTargetType fromString(String name) { + return fromString(name, PipelineRunTargetType.class); + } + + /** + * Gets known PipelineRunTargetType values. + * + * @return known PipelineRunTargetType values. + */ + public static Collection values() { + return values(PipelineRunTargetType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerDescriptor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerDescriptor.java new file mode 100644 index 000000000000..5f306241fac3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerDescriptor.java @@ -0,0 +1,88 @@ +// Copyright (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; + +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 pipeline source trigger descriptor. + */ +@Immutable +public final class PipelineSourceTriggerDescriptor implements JsonSerializable { + /* + * The timestamp when the source update happened. + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of PipelineSourceTriggerDescriptor class. + */ + private PipelineSourceTriggerDescriptor() { + } + + /** + * Get the timestamp property: The timestamp when the source update happened. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineSourceTriggerDescriptor from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineSourceTriggerDescriptor 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 PipelineSourceTriggerDescriptor. + */ + public static PipelineSourceTriggerDescriptor fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineSourceTriggerDescriptor deserializedPipelineSourceTriggerDescriptor + = new PipelineSourceTriggerDescriptor(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timestamp".equals(fieldName)) { + deserializedPipelineSourceTriggerDescriptor.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineSourceTriggerDescriptor; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerProperties.java new file mode 100644 index 000000000000..1029e7bfcc3f --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerProperties.java @@ -0,0 +1,103 @@ +// Copyright (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; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 source trigger properties of the import pipeline. + */ +@Fluent +public final class PipelineSourceTriggerProperties implements JsonSerializable { + /* + * The current status of the source trigger. + */ + private TriggerStatus status; + + /** + * Creates an instance of PipelineSourceTriggerProperties class. + */ + public PipelineSourceTriggerProperties() { + } + + /** + * Get the status property: The current status of the source trigger. + * + * @return the status value. + */ + public TriggerStatus status() { + return this.status; + } + + /** + * Set the status property: The current status of the source trigger. + * + * @param status the status value to set. + * @return the PipelineSourceTriggerProperties object itself. + */ + public PipelineSourceTriggerProperties withStatus(TriggerStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model PipelineSourceTriggerProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PipelineSourceTriggerProperties.class); + + /** + * {@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 PipelineSourceTriggerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineSourceTriggerProperties 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 PipelineSourceTriggerProperties. + */ + public static PipelineSourceTriggerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineSourceTriggerProperties deserializedPipelineSourceTriggerProperties + = new PipelineSourceTriggerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPipelineSourceTriggerProperties.status = TriggerStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineSourceTriggerProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceType.java new file mode 100644 index 000000000000..5b253676cb51 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of source for the import pipeline. + */ +public final class PipelineSourceType extends ExpandableStringEnum { + /** + * Static value AzureStorageBlobContainer for PipelineSourceType. + */ + public static final PipelineSourceType AZURE_STORAGE_BLOB_CONTAINER = fromString("AzureStorageBlobContainer"); + + /** + * Creates a new instance of PipelineSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PipelineSourceType() { + } + + /** + * Creates or finds a PipelineSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PipelineSourceType. + */ + public static PipelineSourceType fromString(String name) { + return fromString(name, PipelineSourceType.class); + } + + /** + * Gets known PipelineSourceType values. + * + * @return known PipelineSourceType values. + */ + public static Collection values() { + return values(PipelineSourceType.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerDescriptor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerDescriptor.java new file mode 100644 index 000000000000..d9279f61bf2d --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerDescriptor.java @@ -0,0 +1,86 @@ +// Copyright (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; + +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 pipeline trigger descriptor. + */ +@Immutable +public final class PipelineTriggerDescriptor implements JsonSerializable { + /* + * The source trigger that caused the pipeline run. + */ + private PipelineSourceTriggerDescriptor sourceTrigger; + + /** + * Creates an instance of PipelineTriggerDescriptor class. + */ + private PipelineTriggerDescriptor() { + } + + /** + * Get the sourceTrigger property: The source trigger that caused the pipeline run. + * + * @return the sourceTrigger value. + */ + public PipelineSourceTriggerDescriptor sourceTrigger() { + return this.sourceTrigger; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceTrigger() != null) { + sourceTrigger().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sourceTrigger", this.sourceTrigger); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineTriggerDescriptor from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineTriggerDescriptor 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 PipelineTriggerDescriptor. + */ + public static PipelineTriggerDescriptor fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineTriggerDescriptor deserializedPipelineTriggerDescriptor = new PipelineTriggerDescriptor(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceTrigger".equals(fieldName)) { + deserializedPipelineTriggerDescriptor.sourceTrigger + = PipelineSourceTriggerDescriptor.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineTriggerDescriptor; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerProperties.java new file mode 100644 index 000000000000..ac48ebde2986 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerProperties.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.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 trigger properties of the import pipeline. + */ +@Fluent +public final class PipelineTriggerProperties implements JsonSerializable { + /* + * The source trigger properties of the pipeline. + */ + private PipelineSourceTriggerProperties sourceTrigger; + + /** + * Creates an instance of PipelineTriggerProperties class. + */ + public PipelineTriggerProperties() { + } + + /** + * Get the sourceTrigger property: The source trigger properties of the pipeline. + * + * @return the sourceTrigger value. + */ + public PipelineSourceTriggerProperties sourceTrigger() { + return this.sourceTrigger; + } + + /** + * Set the sourceTrigger property: The source trigger properties of the pipeline. + * + * @param sourceTrigger the sourceTrigger value to set. + * @return the PipelineTriggerProperties object itself. + */ + public PipelineTriggerProperties withSourceTrigger(PipelineSourceTriggerProperties sourceTrigger) { + this.sourceTrigger = sourceTrigger; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceTrigger() != null) { + sourceTrigger().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sourceTrigger", this.sourceTrigger); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PipelineTriggerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PipelineTriggerProperties 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 PipelineTriggerProperties. + */ + public static PipelineTriggerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PipelineTriggerProperties deserializedPipelineTriggerProperties = new PipelineTriggerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceTrigger".equals(fieldName)) { + deserializedPipelineTriggerProperties.sourceTrigger + = PipelineSourceTriggerProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPipelineTriggerProperties; + }); + } +} 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 18bff10d89f7..3aada7596bd2 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 @@ -41,6 +41,11 @@ public final class Policies implements JsonSerializable { */ private AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy; + /* + * The soft delete policy for a container registry. + */ + private SoftDeletePolicy softDeletePolicy; + /** * Creates an instance of Policies class. */ @@ -150,6 +155,26 @@ public AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy() { return this; } + /** + * Get the softDeletePolicy property: The soft delete policy for a container registry. + * + * @return the softDeletePolicy value. + */ + public SoftDeletePolicy softDeletePolicy() { + return this.softDeletePolicy; + } + + /** + * Set the softDeletePolicy property: The soft delete policy for a container registry. + * + * @param softDeletePolicy the softDeletePolicy value to set. + * @return the Policies object itself. + */ + public Policies withSoftDeletePolicy(SoftDeletePolicy softDeletePolicy) { + this.softDeletePolicy = softDeletePolicy; + return this; + } + /** * Validates the instance. * @@ -171,6 +196,9 @@ public void validate() { if (azureADAuthenticationAsArmPolicy() != null) { azureADAuthenticationAsArmPolicy().validate(); } + if (softDeletePolicy() != null) { + softDeletePolicy().validate(); + } } /** @@ -184,6 +212,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("retentionPolicy", this.retentionPolicy); jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); jsonWriter.writeJsonField("azureADAuthenticationAsArmPolicy", this.azureADAuthenticationAsArmPolicy); + jsonWriter.writeJsonField("softDeletePolicy", this.softDeletePolicy); return jsonWriter.writeEndObject(); } @@ -213,6 +242,8 @@ public static Policies fromJson(JsonReader jsonReader) throws IOException { } else if ("azureADAuthenticationAsArmPolicy".equals(fieldName)) { deserializedPolicies.azureADAuthenticationAsArmPolicy = AzureADAuthenticationAsArmPolicy.fromJson(reader); + } else if ("softDeletePolicy".equals(fieldName)) { + deserializedPolicies.softDeletePolicy = SoftDeletePolicy.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProgressProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProgressProperties.java new file mode 100644 index 000000000000..c507729f3108 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProgressProperties.java @@ -0,0 +1,82 @@ +// Copyright (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; + +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 progress properties. + */ +@Immutable +public final class ProgressProperties implements JsonSerializable { + /* + * The percentage complete of the copy operation. + */ + private String percentage; + + /** + * Creates an instance of ProgressProperties class. + */ + private ProgressProperties() { + } + + /** + * Get the percentage property: The percentage complete of the copy operation. + * + * @return the percentage value. + */ + public String percentage() { + return this.percentage; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("percentage", this.percentage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProgressProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProgressProperties 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 ProgressProperties. + */ + public static ProgressProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProgressProperties deserializedProgressProperties = new ProgressProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("percentage".equals(fieldName)) { + deserializedProgressProperties.percentage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProgressProperties; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegionalEndpoints.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegionalEndpoints.java new file mode 100644 index 000000000000..412813e65ebd --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegionalEndpoints.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; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether or not per-region endpoints are enabled for accessing the registry. + */ +public final class RegionalEndpoints extends ExpandableStringEnum { + /** + * Regional endpoints are enabled. + */ + public static final RegionalEndpoints ENABLED = fromString("Enabled"); + + /** + * Regional endpoints are disabled. + */ + public static final RegionalEndpoints DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of RegionalEndpoints value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegionalEndpoints() { + } + + /** + * Creates or finds a RegionalEndpoints from its string representation. + * + * @param name a name to look for. + * @return the corresponding RegionalEndpoints. + */ + public static RegionalEndpoints fromString(String name) { + return fromString(name, RegionalEndpoints.class); + } + + /** + * Gets known RegionalEndpoints values. + * + * @return known RegionalEndpoints values. + */ + public static Collection values() { + return values(RegionalEndpoints.class); + } +} 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 ee66f7601c28..00956249a7b3 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 @@ -27,6 +27,16 @@ public final class RegistryNameCheckRequest implements JsonSerializable { + /* + * The action that triggered the most recent registry sync. + */ + private SyncTrigger syncTrigger; + + /* + * The status of the connected registry's most recent sync. + */ + private SyncState syncState; + + /* + * The time that the connected registry's most recent sync started. + */ + private OffsetDateTime lastSyncStartTime; + + /* + * The time that the connected registry's most recent sync ended. + */ + private OffsetDateTime lastSyncEndTime; + + /* + * The time that the connected registry's most recent successful sync ended. + */ + private OffsetDateTime lastSuccessfulSyncEndTime; + + /** + * Creates an instance of RegistrySyncResult class. + */ + public RegistrySyncResult() { + } + + /** + * Get the syncTrigger property: The action that triggered the most recent registry sync. + * + * @return the syncTrigger value. + */ + public SyncTrigger syncTrigger() { + return this.syncTrigger; + } + + /** + * Get the syncState property: The status of the connected registry's most recent sync. + * + * @return the syncState value. + */ + public SyncState syncState() { + return this.syncState; + } + + /** + * Get the lastSyncStartTime property: The time that the connected registry's most recent sync started. + * + * @return the lastSyncStartTime value. + */ + public OffsetDateTime lastSyncStartTime() { + return this.lastSyncStartTime; + } + + /** + * Set the lastSyncStartTime property: The time that the connected registry's most recent sync started. + * + * @param lastSyncStartTime the lastSyncStartTime value to set. + * @return the RegistrySyncResult object itself. + */ + public RegistrySyncResult withLastSyncStartTime(OffsetDateTime lastSyncStartTime) { + this.lastSyncStartTime = lastSyncStartTime; + return this; + } + + /** + * Get the lastSyncEndTime property: The time that the connected registry's most recent sync ended. + * + * @return the lastSyncEndTime value. + */ + public OffsetDateTime lastSyncEndTime() { + return this.lastSyncEndTime; + } + + /** + * Set the lastSyncEndTime property: The time that the connected registry's most recent sync ended. + * + * @param lastSyncEndTime the lastSyncEndTime value to set. + * @return the RegistrySyncResult object itself. + */ + public RegistrySyncResult withLastSyncEndTime(OffsetDateTime lastSyncEndTime) { + this.lastSyncEndTime = lastSyncEndTime; + return this; + } + + /** + * Get the lastSuccessfulSyncEndTime property: The time that the connected registry's most recent successful sync + * ended. + * + * @return the lastSuccessfulSyncEndTime value. + */ + public OffsetDateTime lastSuccessfulSyncEndTime() { + return this.lastSuccessfulSyncEndTime; + } + + /** + * Set the lastSuccessfulSyncEndTime property: The time that the connected registry's most recent successful sync + * ended. + * + * @param lastSuccessfulSyncEndTime the lastSuccessfulSyncEndTime value to set. + * @return the RegistrySyncResult object itself. + */ + public RegistrySyncResult withLastSuccessfulSyncEndTime(OffsetDateTime lastSuccessfulSyncEndTime) { + this.lastSuccessfulSyncEndTime = lastSuccessfulSyncEndTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lastSyncStartTime", + this.lastSyncStartTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSyncStartTime)); + jsonWriter.writeStringField("lastSyncEndTime", + this.lastSyncEndTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSyncEndTime)); + jsonWriter.writeStringField("lastSuccessfulSyncEndTime", + this.lastSuccessfulSyncEndTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSuccessfulSyncEndTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegistrySyncResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegistrySyncResult 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 RegistrySyncResult. + */ + public static RegistrySyncResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegistrySyncResult deserializedRegistrySyncResult = new RegistrySyncResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("syncTrigger".equals(fieldName)) { + deserializedRegistrySyncResult.syncTrigger = SyncTrigger.fromString(reader.getString()); + } else if ("syncState".equals(fieldName)) { + deserializedRegistrySyncResult.syncState = SyncState.fromString(reader.getString()); + } else if ("lastSyncStartTime".equals(fieldName)) { + deserializedRegistrySyncResult.lastSyncStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSyncEndTime".equals(fieldName)) { + deserializedRegistrySyncResult.lastSyncEndTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSuccessfulSyncEndTime".equals(fieldName)) { + deserializedRegistrySyncResult.lastSuccessfulSyncEndTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRegistrySyncResult; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java index 0e1a0fa43b08..ddc2048a0fbf 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RegistryUpdateParameters.java @@ -228,6 +228,54 @@ public RegistryUpdateParameters withDataEndpointEnabled(Boolean dataEndpointEnab return this; } + /** + * Get the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @return the regionalEndpoints value. + */ + public RegionalEndpoints regionalEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().regionalEndpoints(); + } + + /** + * Set the regionalEndpoints property: Enable per-region endpoints for accessing registry. + * + * @param regionalEndpoints the regionalEndpoints value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withRegionalEndpoints(RegionalEndpoints regionalEndpoints) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withRegionalEndpoints(regionalEndpoints); + return this; + } + + /** + * Get the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @return the endpointProtocol value. + */ + public EndpointProtocol endpointProtocol() { + return this.innerProperties() == null ? null : this.innerProperties().endpointProtocol(); + } + + /** + * Set the endpointProtocol property: The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 + * and IPv6). + * + * @param endpointProtocol the endpointProtocol value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withEndpointProtocol(EndpointProtocol endpointProtocol) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withEndpointProtocol(endpointProtocol); + return this; + } + /** * Get the publicNetworkAccess property: Whether or not public network access is allowed for the container registry. * @@ -324,6 +372,29 @@ public RegistryUpdateParameters withAnonymousPullEnabled(Boolean anonymousPullEn return this; } + /** + * Get the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @return the metadataSearch value. + */ + public MetadataSearch metadataSearch() { + return this.innerProperties() == null ? null : this.innerProperties().metadataSearch(); + } + + /** + * Set the metadataSearch property: Determines whether registry artifacts are indexed for metadata search. + * + * @param metadataSearch the metadataSearch value to set. + * @return the RegistryUpdateParameters object itself. + */ + public RegistryUpdateParameters withMetadataSearch(MetadataSearch metadataSearch) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPropertiesUpdateParameters(); + } + this.innerProperties().withMetadataSearch(metadataSearch); + 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/models/SoftDeletePolicy.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SoftDeletePolicy.java new file mode 100644 index 000000000000..ad05ecfd54c7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SoftDeletePolicy.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.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 soft delete policy for a container registry. + */ +@Fluent +public final class SoftDeletePolicy implements JsonSerializable { + /* + * The number of days after which a soft-deleted item is permanently deleted. + */ + private Integer retentionDays; + + /* + * 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 SoftDeletePolicy class. + */ + public SoftDeletePolicy() { + } + + /** + * Get the retentionDays property: The number of days after which a soft-deleted item is permanently deleted. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: The number of days after which a soft-deleted item is permanently deleted. + * + * @param retentionDays the retentionDays value to set. + * @return the SoftDeletePolicy object itself. + */ + public SoftDeletePolicy withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + 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 SoftDeletePolicy object itself. + */ + public SoftDeletePolicy withStatus(PolicyStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SoftDeletePolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SoftDeletePolicy 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 SoftDeletePolicy. + */ + public static SoftDeletePolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SoftDeletePolicy deserializedSoftDeletePolicy = new SoftDeletePolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("retentionDays".equals(fieldName)) { + deserializedSoftDeletePolicy.retentionDays = reader.getNullable(JsonReader::getInt); + } else if ("lastUpdatedTime".equals(fieldName)) { + deserializedSoftDeletePolicy.lastUpdatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedSoftDeletePolicy.status = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSoftDeletePolicy; + }); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StorageAccessMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StorageAccessMode.java new file mode 100644 index 000000000000..56d639940dee --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StorageAccessMode.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; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The storage access mode used for the customer storage account. + */ +public final class StorageAccessMode extends ExpandableStringEnum { + /** + * Managed Identity access mode. + */ + public static final StorageAccessMode MANAGED_IDENTITY = fromString("ManagedIdentity"); + + /** + * SAS Token access mode. + */ + public static final StorageAccessMode SAS_TOKEN = fromString("SasToken"); + + /** + * Creates a new instance of StorageAccessMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageAccessMode() { + } + + /** + * Creates or finds a StorageAccessMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageAccessMode. + */ + public static StorageAccessMode fromString(String name) { + return fromString(name, StorageAccessMode.class); + } + + /** + * Gets known StorageAccessMode values. + * + * @return known StorageAccessMode values. + */ + public static Collection values() { + return values(StorageAccessMode.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncState.java new file mode 100644 index 000000000000..125043ad4091 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncState.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The action that triggered the most recent registry sync. + */ +public final class SyncState extends ExpandableStringEnum { + /** + * Connected Registry is not activated. + */ + public static final SyncState NOT_ACTIVATED = fromString("NotActivated"); + + /** + * Connected Registry is syncing. + */ + public static final SyncState SYNCING = fromString("Syncing"); + + /** + * Connected Registry sync failed. + */ + public static final SyncState FAILED = fromString("Failed"); + + /** + * Connected Registry sync succeeded. + */ + public static final SyncState SUCCEEDED = fromString("Succeeded"); + + /** + * Connected Registry sync timed out. + */ + public static final SyncState TIMED_OUT = fromString("TimedOut"); + + /** + * Connected Registry sync is pending. + */ + public static final SyncState PENDING = fromString("Pending"); + + /** + * Creates a new instance of SyncState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncState() { + } + + /** + * Creates or finds a SyncState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SyncState. + */ + public static SyncState fromString(String name) { + return fromString(name, SyncState.class); + } + + /** + * Gets known SyncState values. + * + * @return known SyncState values. + */ + public static Collection values() { + return values(SyncState.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncTrigger.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncTrigger.java new file mode 100644 index 000000000000..1f3a5be292a5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SyncTrigger.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the connected registry's most recent sync. + */ +public final class SyncTrigger extends ExpandableStringEnum { + /** + * Connected Registry sync was triggered by a sync token update. + */ + public static final SyncTrigger SYNC_TOKEN_UPDATE = fromString("SyncTokenUpdate"); + + /** + * Connected Registry sync was triggered by an initial sync during activation. + */ + public static final SyncTrigger INITIAL_SYNC = fromString("InitialSync"); + + /** + * Connected Registry sync was triggered by a manual resync request. + */ + public static final SyncTrigger MANUAL_RESYNC = fromString("ManualResync"); + + /** + * Connected Registry sync was triggered by the Connected Registry's recovery service. + */ + public static final SyncTrigger RECOVERY_SERVICE = fromString("RecoveryService"); + + /** + * Creates a new instance of SyncTrigger value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncTrigger() { + } + + /** + * Creates or finds a SyncTrigger from its string representation. + * + * @param name a name to look for. + * @return the corresponding SyncTrigger. + */ + public static SyncTrigger fromString(String name) { + return fromString(name, SyncTrigger.class); + } + + /** + * Gets known SyncTrigger values. + * + * @return known SyncTrigger values. + */ + public static Collection values() { + return values(SyncTrigger.class); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java index da23d272d08a..08ef8c6ce7ec 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java @@ -1,5 +1,6 @@ // Copyright (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; @@ -7,18 +8,18 @@ import java.util.Collection; /** - * The current status of trigger. + * The current status of the source trigger. */ public final class TriggerStatus extends ExpandableStringEnum { /** - * Static value Disabled for TriggerStatus. + * Static value Enabled for TriggerStatus. */ - public static final TriggerStatus DISABLED = fromString("Disabled"); + public static final TriggerStatus ENABLED = fromString("Enabled"); /** - * Static value Enabled for TriggerStatus. + * Static value Disabled for TriggerStatus. */ - public static final TriggerStatus ENABLED = fromString("Enabled"); + public static final TriggerStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of TriggerStatus value. 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 79024780ad8e..76f60b8fbd75 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/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":"2026-01-01-preview","generatedFiles":["src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchiveVersionsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ArchivesClient.java","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/ExportPipelinesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/ImportPipelinesClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/PipelineRunsClient.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/ArchiveInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ArchiveVersionProperties.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/ExportPipelineInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ExportPipelineProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/GenerateCredentialsResultInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/ImportPipelineProperties.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/PipelineRunInner.java","src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PipelineRunProperties.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/ArchiveVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ArchivesClientImpl.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/ExportPipelinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/ImportPipelinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/PipelineRunsClientImpl.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/ArchiveListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ArchiveVersionListResult.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/ExportPipelineListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/ImportPipelineListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerregistry/implementation/models/PipelineRunListResult.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/ArchivePackageSourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/ArchiveUpdateParameters.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/AutoGeneratedDomainNameLabelScope.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/EndpointProtocol.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/ExportPipelineTargetProperties.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/ImportPipelineSourceProperties.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/MetadataSearch.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/PackageSourceType.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/PipelineOptions.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunRequest.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunResponse.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunSourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineRunTargetType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerDescriptor.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceTriggerProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineSourceType.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerDescriptor.java","src/main/java/com/azure/resourcemanager/containerregistry/models/PipelineTriggerProperties.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/ProgressProperties.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/RegionalEndpoints.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/RegistrySyncResult.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/SoftDeletePolicy.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/StorageAccessMode.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncProperties.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncState.java","src/main/java/com/azure/resourcemanager/containerregistry/models/SyncTrigger.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/TriggerStatus.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/azure-resourcemanager-containerregistry/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json index 4bcc116332bd..d9d3d328ebd7 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerregistry.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.implementation.WebhooksClientImpl$WebhooksService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerregistry.implementation.ArchiveVersionsClientImpl$ArchiveVersionsService"],["com.azure.resourcemanager.containerregistry.implementation.ArchivesClientImpl$ArchivesService"],["com.azure.resourcemanager.containerregistry.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.implementation.ExportPipelinesClientImpl$ExportPipelinesService"],["com.azure.resourcemanager.containerregistry.implementation.ImportPipelinesClientImpl$ImportPipelinesService"],["com.azure.resourcemanager.containerregistry.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.implementation.PipelineRunsClientImpl$PipelineRunsService"],["com.azure.resourcemanager.containerregistry.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.implementation.WebhooksClientImpl$WebhooksService"]] \ 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 782174d969a3..a9e985f7cef8 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\":\"yhejhzisxgfp\"}").toObject(Actor.class); - Assertions.assertEquals("yhejhzisxgfp", model.name()); + Actor model = BinaryData.fromString("{\"name\":\"pevzhfst\"}").toObject(Actor.class); + Assertions.assertEquals("pevzhfst", model.name()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveInnerTests.java new file mode 100644 index 000000000000..c5340df88389 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveInnerTests.java @@ -0,0 +1,37 @@ +// Copyright (c) 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.ArchiveInner; +import com.azure.resourcemanager.containerregistry.models.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PackageSourceType; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveInner model = BinaryData.fromString( + "{\"properties\":{\"packageSource\":{\"type\":\"remote\",\"url\":\"gz\"},\"publishedVersion\":\"u\",\"repositoryEndpointPrefix\":\"mvfaxkffeiith\",\"repositoryEndpoint\":\"m\",\"provisioningState\":\"Updating\"},\"id\":\"shxmzsbbzoggigrx\",\"name\":\"burvjxxjnspy\",\"type\":\"ptkoenkoukn\"}") + .toObject(ArchiveInner.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.packageSource().type()); + Assertions.assertEquals("gz", model.packageSource().url()); + Assertions.assertEquals("u", model.publishedVersion()); + Assertions.assertEquals("mvfaxkffeiith", model.repositoryEndpointPrefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArchiveInner model = new ArchiveInner() + .withPackageSource(new ArchivePackageSourceProperties().withType(PackageSourceType.REMOTE).withUrl("gz")) + .withPublishedVersion("u") + .withRepositoryEndpointPrefix("mvfaxkffeiith"); + model = BinaryData.fromObject(model).toObject(ArchiveInner.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.packageSource().type()); + Assertions.assertEquals("gz", model.packageSource().url()); + Assertions.assertEquals("u", model.publishedVersion()); + Assertions.assertEquals("mvfaxkffeiith", model.repositoryEndpointPrefix()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveListResultTests.java new file mode 100644 index 000000000000..f8ef524db66c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveListResultTests.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.ArchiveListResult; +import com.azure.resourcemanager.containerregistry.models.PackageSourceType; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"packageSource\":{\"type\":\"remote\",\"url\":\"ejzicwifsjtt\"},\"publishedVersion\":\"fbishcbkha\",\"repositoryEndpointPrefix\":\"eyeam\",\"repositoryEndpoint\":\"hagalpbuxwgipwh\",\"provisioningState\":\"Succeeded\"},\"id\":\"kgshwa\",\"name\":\"kix\",\"type\":\"bin\"},{\"properties\":{\"packageSource\":{\"type\":\"remote\",\"url\":\"mryw\"},\"publishedVersion\":\"zoqftiyqzrnkcqvy\",\"repositoryEndpointPrefix\":\"whzlsicohoq\",\"repositoryEndpoint\":\"wvl\",\"provisioningState\":\"Deleting\"},\"id\":\"w\",\"name\":\"heun\",\"type\":\"mqhgyxzkonocuk\"},{\"properties\":{\"packageSource\":{\"type\":\"remote\",\"url\":\"uconuqszfkbey\"},\"publishedVersion\":\"wrmjmwvvjektc\",\"repositoryEndpointPrefix\":\"enhwlrs\",\"repositoryEndpoint\":\"rzpwvlqdqgbiq\",\"provisioningState\":\"Canceled\"},\"id\":\"kaet\",\"name\":\"kt\",\"type\":\"fcivfsnkym\"},{\"properties\":{\"packageSource\":{\"type\":\"remote\",\"url\":\"fbebrjcxer\"},\"publishedVersion\":\"wutttxfvjrbi\",\"repositoryEndpointPrefix\":\"hxepcyvahfnlj\",\"repositoryEndpoint\":\"qxj\",\"provisioningState\":\"Failed\"},\"id\":\"qgidokgjljyo\",\"name\":\"gvcl\",\"type\":\"bgsncghkjeszzhb\"}],\"nextLink\":\"htxfvgxbfsmxnehm\"}") + .toObject(ArchiveListResult.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.value().get(0).packageSource().type()); + Assertions.assertEquals("ejzicwifsjtt", model.value().get(0).packageSource().url()); + Assertions.assertEquals("fbishcbkha", model.value().get(0).publishedVersion()); + Assertions.assertEquals("eyeam", model.value().get(0).repositoryEndpointPrefix()); + Assertions.assertEquals("htxfvgxbfsmxnehm", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePackageSourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePackageSourcePropertiesTests.java new file mode 100644 index 000000000000..bb8e9ae087d3 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePackageSourcePropertiesTests.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.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PackageSourceType; +import org.junit.jupiter.api.Assertions; + +public final class ArchivePackageSourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchivePackageSourceProperties model = BinaryData.fromString("{\"type\":\"remote\",\"url\":\"rbpizc\"}") + .toObject(ArchivePackageSourceProperties.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.type()); + Assertions.assertEquals("rbpizc", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArchivePackageSourceProperties model + = new ArchivePackageSourceProperties().withType(PackageSourceType.REMOTE).withUrl("rbpizc"); + model = BinaryData.fromObject(model).toObject(ArchivePackageSourceProperties.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.type()); + Assertions.assertEquals("rbpizc", model.url()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePropertiesTests.java new file mode 100644 index 000000000000..cbefd31702f2 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchivePropertiesTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.fluent.models.ArchiveProperties; +import com.azure.resourcemanager.containerregistry.models.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PackageSourceType; +import org.junit.jupiter.api.Assertions; + +public final class ArchivePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveProperties model = BinaryData.fromString( + "{\"packageSource\":{\"type\":\"remote\",\"url\":\"iukbldngkpoci\"},\"publishedVersion\":\"z\",\"repositoryEndpointPrefix\":\"o\",\"repositoryEndpoint\":\"ukgjnpiucgygevq\",\"provisioningState\":\"Updating\"}") + .toObject(ArchiveProperties.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.packageSource().type()); + Assertions.assertEquals("iukbldngkpoci", model.packageSource().url()); + Assertions.assertEquals("z", model.publishedVersion()); + Assertions.assertEquals("o", model.repositoryEndpointPrefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArchiveProperties model = new ArchiveProperties() + .withPackageSource( + new ArchivePackageSourceProperties().withType(PackageSourceType.REMOTE).withUrl("iukbldngkpoci")) + .withPublishedVersion("z") + .withRepositoryEndpointPrefix("o"); + model = BinaryData.fromObject(model).toObject(ArchiveProperties.class); + Assertions.assertEquals(PackageSourceType.REMOTE, model.packageSource().type()); + Assertions.assertEquals("iukbldngkpoci", model.packageSource().url()); + Assertions.assertEquals("z", model.publishedVersion()); + Assertions.assertEquals("o", model.repositoryEndpointPrefix()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdateParametersTests.java new file mode 100644 index 000000000000..bf3bd9cf68f9 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdateParametersTests.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.ArchiveUpdateParameters; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveUpdateParameters model = BinaryData.fromString("{\"properties\":{\"publishedVersion\":\"j\"}}") + .toObject(ArchiveUpdateParameters.class); + Assertions.assertEquals("j", model.publishedVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArchiveUpdateParameters model = new ArchiveUpdateParameters().withPublishedVersion("j"); + model = BinaryData.fromObject(model).toObject(ArchiveUpdateParameters.class); + Assertions.assertEquals("j", model.publishedVersion()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdatePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdatePropertiesTests.java new file mode 100644 index 000000000000..d0d3aa2d2050 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveUpdatePropertiesTests.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.fluent.models.ArchiveUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveUpdateProperties model + = BinaryData.fromString("{\"publishedVersion\":\"pyd\"}").toObject(ArchiveUpdateProperties.class); + Assertions.assertEquals("pyd", model.publishedVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ArchiveUpdateProperties model = new ArchiveUpdateProperties().withPublishedVersion("pyd"); + model = BinaryData.fromObject(model).toObject(ArchiveUpdateProperties.class); + Assertions.assertEquals("pyd", model.publishedVersion()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionInnerTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionInnerTests.java new file mode 100644 index 000000000000..71acc9b40528 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionInnerTests.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.ArchiveVersionInner; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveVersionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveVersionInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"archiveVersionErrorMessage\":\"godebfqkkrbmpu\"},\"id\":\"riwflzlfb\",\"name\":\"zpuzycisp\",\"type\":\"qzahmgkbrp\"}") + .toObject(ArchiveVersionInner.class); + Assertions.assertEquals("godebfqkkrbmpu", model.archiveVersionErrorMessage()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionListResultTests.java new file mode 100644 index 000000000000..a3fcc672dd35 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionListResultTests.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.ArchiveVersionListResult; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveVersionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveVersionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"archiveVersionErrorMessage\":\"agnb\"},\"id\":\"nhijggmebfsi\",\"name\":\"rbu\",\"type\":\"rcvpnazzmhjrunmp\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"archiveVersionErrorMessage\":\"hrbnlankxmyskpbh\"},\"id\":\"btkcxywnytnrsyn\",\"name\":\"qidybyx\",\"type\":\"zfcl\"}],\"nextLink\":\"axdbabph\"}") + .toObject(ArchiveVersionListResult.class); + Assertions.assertEquals("agnb", model.value().get(0).archiveVersionErrorMessage()); + Assertions.assertEquals("axdbabph", model.nextLink()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionPropertiesTests.java new file mode 100644 index 000000000000..e4eb9a1170fb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionPropertiesTests.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.ArchiveVersionProperties; +import org.junit.jupiter.api.Assertions; + +public final class ArchiveVersionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ArchiveVersionProperties model = BinaryData + .fromString("{\"provisioningState\":\"Deleting\",\"archiveVersionErrorMessage\":\"ibnuqqkpik\"}") + .toObject(ArchiveVersionProperties.class); + Assertions.assertEquals("ibnuqqkpik", model.archiveVersionErrorMessage()); + } +} 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 420a87bbb2dc..da162f5cad3d 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\":\"nmdyodnwzxl\",\"customHeaders\":{\"avvwxqi\":\"vnhltiugcx\",\"unyowxwl\":\"y\",\"odacizs\":\"djrkvfgbvfvpd\"}}") + "{\"serviceUri\":\"ncu\",\"customHeaders\":{\"htywubxcbihwq\":\"iwii\",\"wjchrdg\":\"nfdn\",\"uu\":\"ihxumwctondzj\"}}") .toObject(CallbackConfigInner.class); - Assertions.assertEquals("nmdyodnwzxl", model.serviceUri()); - Assertions.assertEquals("vnhltiugcx", model.customHeaders().get("avvwxqi")); + Assertions.assertEquals("ncu", model.serviceUri()); + Assertions.assertEquals("iwii", model.customHeaders().get("htywubxcbihwq")); } } 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 42967fdb3ef3..3af4beb1f3fb 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\":\"qgsfraoyzkoow\",\"timestamp\":\"2021-01-01T04:06:13Z\",\"action\":\"guxawqaldsyuuxi\",\"target\":{\"mediaType\":\"qfobwyz\",\"size\":5853519584065251254,\"digest\":\"utwpfhp\",\"length\":622879403847581793,\"repository\":\"skdsnfdsdoakg\",\"url\":\"lmkk\",\"tag\":\"vdlhewpusdsttwv\",\"name\":\"vbbejdcng\",\"version\":\"m\"},\"request\":{\"id\":\"ufgmjzrwrdg\",\"addr\":\"wae\",\"host\":\"uzkopbminrfd\",\"method\":\"yuhhziu\",\"useragent\":\"fozbhdmsmlmzqhof\"},\"actor\":{\"name\":\"ae\"},\"source\":{\"addr\":\"ah\",\"instanceID\":\"cslfaoqzpiyylha\"}}") + "{\"id\":\"vkzuhbxvvyhgso\",\"timestamp\":\"2020-12-29T01:37:17Z\",\"action\":\"qufegxuvwzfbn\",\"target\":{\"mediaType\":\"ctlpdngitvgb\",\"size\":5360902839879947019,\"digest\":\"kw\",\"length\":3784796118509954000,\"repository\":\"jvegrhbpnaixexcc\",\"url\":\"reaxhcexdr\",\"tag\":\"qahqkghtpwijn\",\"name\":\"jsvfycxzbfvoowv\",\"version\":\"mtg\"},\"request\":{\"id\":\"pyostronzmyhgfi\",\"addr\":\"sxkm\",\"host\":\"a\",\"method\":\"rrjreafxtsgu\",\"useragent\":\"jglikkxwslolb\"},\"actor\":{\"name\":\"uzlm\"},\"source\":{\"addr\":\"lfktgplcrpwjxe\",\"instanceID\":\"oi\"}}") .toObject(EventContent.class); - Assertions.assertEquals("qgsfraoyzkoow", model.id()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), model.timestamp()); - Assertions.assertEquals("guxawqaldsyuuxi", model.action()); - Assertions.assertEquals("qfobwyz", model.target().mediaType()); - Assertions.assertEquals(5853519584065251254L, model.target().size()); - Assertions.assertEquals("utwpfhp", model.target().digest()); - Assertions.assertEquals(622879403847581793L, model.target().length()); - Assertions.assertEquals("skdsnfdsdoakg", model.target().repository()); - Assertions.assertEquals("lmkk", model.target().url()); - Assertions.assertEquals("vdlhewpusdsttwv", model.target().tag()); - Assertions.assertEquals("vbbejdcng", model.target().name()); - Assertions.assertEquals("m", model.target().version()); - Assertions.assertEquals("ufgmjzrwrdg", model.request().id()); - Assertions.assertEquals("wae", model.request().addr()); - Assertions.assertEquals("uzkopbminrfd", model.request().host()); - Assertions.assertEquals("yuhhziu", model.request().method()); - Assertions.assertEquals("fozbhdmsmlmzqhof", model.request().useragent()); - Assertions.assertEquals("ae", model.actor().name()); - Assertions.assertEquals("ah", model.source().addr()); - Assertions.assertEquals("cslfaoqzpiyylha", model.source().instanceId()); + Assertions.assertEquals("vkzuhbxvvyhgso", model.id()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T01:37:17Z"), model.timestamp()); + Assertions.assertEquals("qufegxuvwzfbn", model.action()); + Assertions.assertEquals("ctlpdngitvgb", model.target().mediaType()); + Assertions.assertEquals(5360902839879947019L, model.target().size()); + Assertions.assertEquals("kw", model.target().digest()); + Assertions.assertEquals(3784796118509954000L, model.target().length()); + Assertions.assertEquals("jvegrhbpnaixexcc", model.target().repository()); + Assertions.assertEquals("reaxhcexdr", model.target().url()); + Assertions.assertEquals("qahqkghtpwijn", model.target().tag()); + Assertions.assertEquals("jsvfycxzbfvoowv", model.target().name()); + Assertions.assertEquals("mtg", model.target().version()); + Assertions.assertEquals("pyostronzmyhgfi", model.request().id()); + Assertions.assertEquals("sxkm", model.request().addr()); + Assertions.assertEquals("a", model.request().host()); + Assertions.assertEquals("rrjreafxtsgu", model.request().method()); + Assertions.assertEquals("jglikkxwslolb", model.request().useragent()); + Assertions.assertEquals("uzlm", model.actor().name()); + Assertions.assertEquals("lfktgplcrpwjxe", model.source().addr()); + Assertions.assertEquals("oi", 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 05aa75f65689..c65d866710c7 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\":\"ldtlwwr\"}").toObject(EventInfoInner.class); - Assertions.assertEquals("ldtlwwr", model.id()); + EventInfoInner model = BinaryData.fromString("{\"id\":\"xicslfao\"}").toObject(EventInfoInner.class); + Assertions.assertEquals("xicslfao", 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 78e2391d674b..fe6f37805b87 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\":\"feqztppriol\",\"timestamp\":\"2020-12-22T04:16:08Z\",\"action\":\"altol\",\"target\":{\"mediaType\":\"wsobqwcsdbn\",\"size\":1277017380119093840,\"digest\":\"ucqdpfuvglsb\",\"length\":1956794003061019493,\"repository\":\"vxb\",\"url\":\"vudutncor\",\"tag\":\"lxqtvcofudfl\",\"name\":\"gj\",\"version\":\"gdknnqv\"},\"request\":{\"id\":\"nqntorudsgsahm\",\"addr\":\"c\",\"host\":\"auwjuetaebu\",\"method\":\"vdmovsmzlxwabm\",\"useragent\":\"efkifr\"},\"actor\":{\"name\":\"u\"},\"source\":{\"addr\":\"mqlgk\",\"instanceID\":\"tndoaongbjc\"}},\"headers\":{\"ojvdcpzfoqo\":\"jitcjedftwwaez\",\"ybxarzgszu\":\"i\",\"hkh\":\"oxciqopidoamcio\"},\"method\":\"xkhnzbonlwnto\",\"requestUri\":\"okdwb\",\"version\":\"kszzcmrvexztv\"}") + "{\"content\":{\"id\":\"vyqia\",\"timestamp\":\"2021-01-15T03:57:36Z\",\"action\":\"pcnp\",\"target\":{\"mediaType\":\"jaesgvvsccya\",\"size\":1317617850914655100,\"digest\":\"hwyg\",\"length\":1617491668539888230,\"repository\":\"kfxu\",\"url\":\"mdwzrmuhapfcqdps\",\"tag\":\"qvpsvuoymg\",\"name\":\"elvezrypq\",\"version\":\"feo\"},\"request\":{\"id\":\"qwkyhkobop\",\"addr\":\"edkowepbqpcrfk\",\"host\":\"ccsnjvcdwxlpq\",\"method\":\"ftnkhtj\",\"useragent\":\"i\"},\"actor\":{\"name\":\"fq\"},\"source\":{\"addr\":\"tdhtmdvyp\",\"instanceID\":\"kdgszywkbirr\"}},\"headers\":{\"nrvgoupmfiibfgg\":\"hlhkjoqrvqqaatj\"},\"method\":\"ool\",\"requestUri\":\"wxkvtkkgll\",\"version\":\"jygvjayvbl\"}") .toObject(EventRequestMessage.class); - Assertions.assertEquals("feqztppriol", model.content().id()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T04:16:08Z"), model.content().timestamp()); - Assertions.assertEquals("altol", model.content().action()); - Assertions.assertEquals("wsobqwcsdbn", model.content().target().mediaType()); - Assertions.assertEquals(1277017380119093840L, model.content().target().size()); - Assertions.assertEquals("ucqdpfuvglsb", model.content().target().digest()); - Assertions.assertEquals(1956794003061019493L, model.content().target().length()); - Assertions.assertEquals("vxb", model.content().target().repository()); - Assertions.assertEquals("vudutncor", model.content().target().url()); - Assertions.assertEquals("lxqtvcofudfl", model.content().target().tag()); - Assertions.assertEquals("gj", model.content().target().name()); - Assertions.assertEquals("gdknnqv", model.content().target().version()); - Assertions.assertEquals("nqntorudsgsahm", model.content().request().id()); - Assertions.assertEquals("c", model.content().request().addr()); - Assertions.assertEquals("auwjuetaebu", model.content().request().host()); - Assertions.assertEquals("vdmovsmzlxwabm", model.content().request().method()); - Assertions.assertEquals("efkifr", model.content().request().useragent()); - Assertions.assertEquals("u", model.content().actor().name()); - Assertions.assertEquals("mqlgk", model.content().source().addr()); - Assertions.assertEquals("tndoaongbjc", model.content().source().instanceId()); - Assertions.assertEquals("jitcjedftwwaez", model.headers().get("ojvdcpzfoqo")); - Assertions.assertEquals("xkhnzbonlwnto", model.method()); - Assertions.assertEquals("okdwb", model.requestUri()); - Assertions.assertEquals("kszzcmrvexztv", model.version()); + Assertions.assertEquals("vyqia", model.content().id()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T03:57:36Z"), model.content().timestamp()); + Assertions.assertEquals("pcnp", model.content().action()); + Assertions.assertEquals("jaesgvvsccya", model.content().target().mediaType()); + Assertions.assertEquals(1317617850914655100L, model.content().target().size()); + Assertions.assertEquals("hwyg", model.content().target().digest()); + Assertions.assertEquals(1617491668539888230L, model.content().target().length()); + Assertions.assertEquals("kfxu", model.content().target().repository()); + Assertions.assertEquals("mdwzrmuhapfcqdps", model.content().target().url()); + Assertions.assertEquals("qvpsvuoymg", model.content().target().tag()); + Assertions.assertEquals("elvezrypq", model.content().target().name()); + Assertions.assertEquals("feo", model.content().target().version()); + Assertions.assertEquals("qwkyhkobop", model.content().request().id()); + Assertions.assertEquals("edkowepbqpcrfk", model.content().request().addr()); + Assertions.assertEquals("ccsnjvcdwxlpq", model.content().request().host()); + Assertions.assertEquals("ftnkhtj", model.content().request().method()); + Assertions.assertEquals("i", model.content().request().useragent()); + Assertions.assertEquals("fq", model.content().actor().name()); + Assertions.assertEquals("tdhtmdvyp", model.content().source().addr()); + Assertions.assertEquals("kdgszywkbirr", model.content().source().instanceId()); + Assertions.assertEquals("hlhkjoqrvqqaatj", model.headers().get("nrvgoupmfiibfgg")); + Assertions.assertEquals("ool", model.method()); + Assertions.assertEquals("wxkvtkkgll", model.requestUri()); + Assertions.assertEquals("jygvjayvbl", 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 4c65445afe18..4ae39b70d1e3 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,17 +11,18 @@ public final class GarbageCollectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":true,\"schedule\":\"ttxfvjr\"}") + GarbageCollectionProperties model = BinaryData.fromString("{\"enabled\":false,\"schedule\":\"qkqujidsu\"}") .toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("ttxfvjr", model.schedule()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("qkqujidsu", model.schedule()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GarbageCollectionProperties model = new GarbageCollectionProperties().withEnabled(true).withSchedule("ttxfvjr"); + GarbageCollectionProperties model + = new GarbageCollectionProperties().withEnabled(false).withSchedule("qkqujidsu"); model = BinaryData.fromObject(model).toObject(GarbageCollectionProperties.class); - Assertions.assertTrue(model.enabled()); - Assertions.assertEquals("ttxfvjr", model.schedule()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("qkqujidsu", 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 index c67e2f8aaa77..33001ca204c6 100644 --- 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 @@ -16,18 +16,18 @@ 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\"}}}") + "{\"principalId\":\"ohjtckw\",\"tenantId\":\"soifiyipjxsqw\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hurzafblj\":{\"principalId\":\"norcjxvsnbyxqab\",\"clientId\":\"ocpcy\"},\"qajzyulpkudjkr\":{\"principalId\":\"pbtoqcjmkl\",\"clientId\":\"vbqid\"},\"locx\":{\"principalId\":\"hbzhfepg\",\"clientId\":\"qex\"},\"a\":{\"principalId\":\"paierh\",\"clientId\":\"csglum\"}}}") .toObject(IdentityProperties.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_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())); + IdentityProperties model = new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("hurzafblj", new UserIdentityProperties(), "qajzyulpkudjkr", + new UserIdentityProperties(), "locx", new UserIdentityProperties(), "a", new UserIdentityProperties())); model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); } // Use "Map.of" if available 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 index 34ad21290372..c49d1da986a0 100644 --- 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 @@ -12,16 +12,16 @@ 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); + IpRule model = BinaryData.fromString("{\"action\":\"Allow\",\"value\":\"awrlyx\"}").toObject(IpRule.class); Assertions.assertEquals(Action.ALLOW, model.action()); - Assertions.assertEquals("jyj", model.ipAddressOrRange()); + Assertions.assertEquals("awrlyx", model.ipAddressOrRange()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpRule model = new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("jyj"); + IpRule model = new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("awrlyx"); model = BinaryData.fromObject(model).toObject(IpRule.class); Assertions.assertEquals(Action.ALLOW, model.action()); - Assertions.assertEquals("jyj", model.ipAddressOrRange()); + Assertions.assertEquals("awrlyx", 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 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 92d1bab9cdcb..9d04e00ffbc7 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\":\"ewrmjmwvvjektc\",\"tls\":{\"status\":\"Disabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"s\"}}}") + "{\"host\":\"ceoveilovno\",\"tls\":{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"bkc\"}}}") .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 index 031114e41e09..6848b38dc20d 100644 --- 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 @@ -15,21 +15,22 @@ 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\"}]}") + NetworkRuleSet model = BinaryData.fromString( + "{\"defaultAction\":\"Allow\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"xigjyjgzjaoyfhr\"},{\"action\":\"Allow\",\"value\":\"lnerkujysvleju\"}]}") .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()); + Assertions.assertEquals("xigjyjgzjaoyfhr", 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"))); + .withIpRules(Arrays.asList(new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("xigjyjgzjaoyfhr"), + new IpRule().withAction(Action.ALLOW).withIpAddressOrRange("lnerkujysvleju"))); 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()); + Assertions.assertEquals("xigjyjgzjaoyfhr", model.ipRules().get(0).ipAddressOrRange()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunRequestTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunRequestTests.java new file mode 100644 index 000000000000..90c6b96db6b0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunRequestTests.java @@ -0,0 +1,49 @@ +// Copyright (c) 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.PipelineRunRequest; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceType; +import com.azure.resourcemanager.containerregistry.models.PipelineRunTargetProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunTargetType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PipelineRunRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineRunRequest model = BinaryData.fromString( + "{\"pipelineResourceId\":\"hnvpamqgxq\",\"artifacts\":[\"zikywgg\",\"kallatmel\",\"uipiccjzk\"],\"source\":{\"type\":\"AzureStorageBlob\",\"name\":\"vc\"},\"target\":{\"type\":\"AzureStorageBlob\",\"name\":\"yrnxxmueedn\"},\"catalogDigest\":\"dvstkw\"}") + .toObject(PipelineRunRequest.class); + Assertions.assertEquals("hnvpamqgxq", model.pipelineResourceId()); + Assertions.assertEquals("zikywgg", model.artifacts().get(0)); + Assertions.assertEquals(PipelineRunSourceType.AZURE_STORAGE_BLOB, model.source().type()); + Assertions.assertEquals("vc", model.source().name()); + Assertions.assertEquals(PipelineRunTargetType.AZURE_STORAGE_BLOB, model.target().type()); + Assertions.assertEquals("yrnxxmueedn", model.target().name()); + Assertions.assertEquals("dvstkw", model.catalogDigest()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PipelineRunRequest model = new PipelineRunRequest().withPipelineResourceId("hnvpamqgxq") + .withArtifacts(Arrays.asList("zikywgg", "kallatmel", "uipiccjzk")) + .withSource( + new PipelineRunSourceProperties().withType(PipelineRunSourceType.AZURE_STORAGE_BLOB).withName("vc")) + .withTarget(new PipelineRunTargetProperties().withType(PipelineRunTargetType.AZURE_STORAGE_BLOB) + .withName("yrnxxmueedn")) + .withCatalogDigest("dvstkw"); + model = BinaryData.fromObject(model).toObject(PipelineRunRequest.class); + Assertions.assertEquals("hnvpamqgxq", model.pipelineResourceId()); + Assertions.assertEquals("zikywgg", model.artifacts().get(0)); + Assertions.assertEquals(PipelineRunSourceType.AZURE_STORAGE_BLOB, model.source().type()); + Assertions.assertEquals("vc", model.source().name()); + Assertions.assertEquals(PipelineRunTargetType.AZURE_STORAGE_BLOB, model.target().type()); + Assertions.assertEquals("yrnxxmueedn", model.target().name()); + Assertions.assertEquals("dvstkw", model.catalogDigest()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunSourcePropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunSourcePropertiesTests.java new file mode 100644 index 000000000000..9bb3c77326d0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunSourcePropertiesTests.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; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceType; +import org.junit.jupiter.api.Assertions; + +public final class PipelineRunSourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineRunSourceProperties model + = BinaryData.fromString("{\"type\":\"AzureStorageBlob\",\"name\":\"healmfmtda\"}") + .toObject(PipelineRunSourceProperties.class); + Assertions.assertEquals(PipelineRunSourceType.AZURE_STORAGE_BLOB, model.type()); + Assertions.assertEquals("healmfmtda", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PipelineRunSourceProperties model + = new PipelineRunSourceProperties().withType(PipelineRunSourceType.AZURE_STORAGE_BLOB) + .withName("healmfmtda"); + model = BinaryData.fromObject(model).toObject(PipelineRunSourceProperties.class); + Assertions.assertEquals(PipelineRunSourceType.AZURE_STORAGE_BLOB, model.type()); + Assertions.assertEquals("healmfmtda", model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunTargetPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunTargetPropertiesTests.java new file mode 100644 index 000000000000..27d2ee3b80fb --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunTargetPropertiesTests.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.PipelineRunTargetProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunTargetType; +import org.junit.jupiter.api.Assertions; + +public final class PipelineRunTargetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineRunTargetProperties model = BinaryData.fromString("{\"type\":\"AzureStorageBlob\",\"name\":\"v\"}") + .toObject(PipelineRunTargetProperties.class); + Assertions.assertEquals(PipelineRunTargetType.AZURE_STORAGE_BLOB, model.type()); + Assertions.assertEquals("v", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PipelineRunTargetProperties model + = new PipelineRunTargetProperties().withType(PipelineRunTargetType.AZURE_STORAGE_BLOB).withName("v"); + model = BinaryData.fromObject(model).toObject(PipelineRunTargetProperties.class); + Assertions.assertEquals(PipelineRunTargetType.AZURE_STORAGE_BLOB, model.type()); + Assertions.assertEquals("v", model.name()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerDescriptorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerDescriptorTests.java new file mode 100644 index 000000000000..51e8be1a00a1 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerDescriptorTests.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.PipelineSourceTriggerDescriptor; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class PipelineSourceTriggerDescriptorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineSourceTriggerDescriptor model = BinaryData.fromString("{\"timestamp\":\"2021-12-04T11:19:32Z\"}") + .toObject(PipelineSourceTriggerDescriptor.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T11:19:32Z"), model.timestamp()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerPropertiesTests.java new file mode 100644 index 000000000000..0c84abb2d013 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineSourceTriggerPropertiesTests.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.PipelineSourceTriggerProperties; +import com.azure.resourcemanager.containerregistry.models.TriggerStatus; +import org.junit.jupiter.api.Assertions; + +public final class PipelineSourceTriggerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineSourceTriggerProperties model + = BinaryData.fromString("{\"status\":\"Enabled\"}").toObject(PipelineSourceTriggerProperties.class); + Assertions.assertEquals(TriggerStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PipelineSourceTriggerProperties model = new PipelineSourceTriggerProperties().withStatus(TriggerStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(PipelineSourceTriggerProperties.class); + Assertions.assertEquals(TriggerStatus.ENABLED, model.status()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerDescriptorTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerDescriptorTests.java new file mode 100644 index 000000000000..cac2ceeb667c --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerDescriptorTests.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.PipelineTriggerDescriptor; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class PipelineTriggerDescriptorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineTriggerDescriptor model + = BinaryData.fromString("{\"sourceTrigger\":{\"timestamp\":\"2021-03-21T22:24:59Z\"}}") + .toObject(PipelineTriggerDescriptor.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-21T22:24:59Z"), model.sourceTrigger().timestamp()); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerPropertiesTests.java new file mode 100644 index 000000000000..c83517673268 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/PipelineTriggerPropertiesTests.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.PipelineSourceTriggerProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineTriggerProperties; +import com.azure.resourcemanager.containerregistry.models.TriggerStatus; +import org.junit.jupiter.api.Assertions; + +public final class PipelineTriggerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PipelineTriggerProperties model = BinaryData.fromString("{\"sourceTrigger\":{\"status\":\"Enabled\"}}") + .toObject(PipelineTriggerProperties.class); + Assertions.assertEquals(TriggerStatus.ENABLED, model.sourceTrigger().status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PipelineTriggerProperties model = new PipelineTriggerProperties() + .withSourceTrigger(new PipelineSourceTriggerProperties().withStatus(TriggerStatus.ENABLED)); + model = BinaryData.fromObject(model).toObject(PipelineTriggerProperties.class); + Assertions.assertEquals(TriggerStatus.ENABLED, model.sourceTrigger().status()); + } +} 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 index 7af4460b1e32..2a721d6ecc21 100644 --- 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 @@ -13,6 +13,7 @@ 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.SoftDeletePolicy; import com.azure.resourcemanager.containerregistry.models.TrustPolicy; import com.azure.resourcemanager.containerregistry.models.TrustPolicyType; import org.junit.jupiter.api.Assertions; @@ -21,34 +22,40 @@ 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\"}}") + "{\"quarantinePolicy\":{\"status\":\"enabled\"},\"trustPolicy\":{\"type\":\"Notary\",\"status\":\"enabled\"},\"retentionPolicy\":{\"days\":1500151010,\"lastUpdatedTime\":\"2021-07-23T00:34:49Z\",\"status\":\"enabled\"},\"exportPolicy\":{\"status\":\"disabled\"},\"azureADAuthenticationAsArmPolicy\":{\"status\":\"enabled\"},\"softDeletePolicy\":{\"retentionDays\":1214648475,\"lastUpdatedTime\":\"2020-12-26T19:13:16Z\",\"status\":\"disabled\"}}") .toObject(Policies.class); - Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(PolicyStatus.ENABLED, 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(1500151010, model.retentionPolicy().days()); Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + Assertions.assertEquals(ExportPolicyStatus.DISABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.azureADAuthenticationAsArmPolicy().status()); + Assertions.assertEquals(1214648475, model.softDeletePolicy().retentionDays()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.softDeletePolicy().status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Policies model = new Policies().withQuarantinePolicy(new QuarantinePolicy().withStatus(PolicyStatus.DISABLED)) + Policies model = new Policies().withQuarantinePolicy(new QuarantinePolicy().withStatus(PolicyStatus.ENABLED)) .withTrustPolicy(new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.ENABLED)) - .withRetentionPolicy(new RetentionPolicy().withDays(1951867342).withStatus(PolicyStatus.ENABLED)) - .withExportPolicy(new ExportPolicy().withStatus(ExportPolicyStatus.ENABLED)) + .withRetentionPolicy(new RetentionPolicy().withDays(1500151010).withStatus(PolicyStatus.ENABLED)) + .withExportPolicy(new ExportPolicy().withStatus(ExportPolicyStatus.DISABLED)) .withAzureADAuthenticationAsArmPolicy( - new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.DISABLED)); + new AzureADAuthenticationAsArmPolicy().withStatus(AzureADAuthenticationAsArmPolicyStatus.ENABLED)) + .withSoftDeletePolicy( + new SoftDeletePolicy().withRetentionDays(1214648475).withStatus(PolicyStatus.DISABLED)); model = BinaryData.fromObject(model).toObject(Policies.class); - Assertions.assertEquals(PolicyStatus.DISABLED, model.quarantinePolicy().status()); + Assertions.assertEquals(PolicyStatus.ENABLED, 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(1500151010, model.retentionPolicy().days()); Assertions.assertEquals(PolicyStatus.ENABLED, model.retentionPolicy().status()); - Assertions.assertEquals(ExportPolicyStatus.ENABLED, model.exportPolicy().status()); - Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.DISABLED, + Assertions.assertEquals(ExportPolicyStatus.DISABLED, model.exportPolicy().status()); + Assertions.assertEquals(AzureADAuthenticationAsArmPolicyStatus.ENABLED, model.azureADAuthenticationAsArmPolicy().status()); + Assertions.assertEquals(1214648475, model.softDeletePolicy().retentionDays()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.softDeletePolicy().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 index a4f32f3ba1f3..40f1e7693011 100644 --- 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 @@ -16,26 +16,26 @@ 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\"}") + "{\"properties\":{\"privateEndpoint\":{\"id\":\"dfvzwdzuhty\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"kfthwxmntei\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Canceled\"},\"id\":\"mijcmmxdcufufs\",\"name\":\"pymzidnsezcxtbzs\",\"type\":\"fycc\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ouqfprwz", model.privateEndpoint().id()); + Assertions.assertEquals("dfvzwdzuhty", model.privateEndpoint().id()); Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("itnwuizgazxufi", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("kfthwxmntei", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.RECREATE, model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionInner model - = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("ouqfprwz")) + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("dfvzwdzuhty")) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("itnwuizgazxufi") - .withActionsRequired(ActionsRequired.NONE)); + .withDescription("kfthwxmntei") + .withActionsRequired(ActionsRequired.RECREATE)); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ouqfprwz", model.privateEndpoint().id()); + Assertions.assertEquals("dfvzwdzuhty", model.privateEndpoint().id()); Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("itnwuizgazxufi", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("kfthwxmntei", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.RECREATE, 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 index 0e960b562ee8..f1152b1dd9af 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,15 +14,14 @@ public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"rbnlankxmyskp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"tkcxywnytnrsy\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Deleting\"},\"id\":\"by\",\"name\":\"czfc\",\"type\":\"haaxdbabphl\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"fkts\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ocmnyyazttbtwwrq\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Canceled\"},\"id\":\"zywbiex\",\"name\":\"fey\",\"type\":\"eaxib\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"bhqwalmuzyoxa\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"jancu\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Updating\"},\"id\":\"avxbniwdjswztsdb\",\"name\":\"gnxytxhpzxbz\",\"type\":\"fzab\"}],\"nextLink\":\"cuh\"}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"kauhashsfwxo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"cugicjoox\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ucww\",\"name\":\"vo\",\"type\":\"bvmeuecivy\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"uojgj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"iotwmcdytdxwit\",\"actionsRequired\":\"None\"},\"provisioningState\":\"Updating\"},\"id\":\"gqwgxhniskxfbkp\",\"name\":\"cg\",\"type\":\"lwn\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"dauwhvylwzbtd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"nbmpowuwprzq\",\"actionsRequired\":\"Recreate\"},\"provisioningState\":\"Deleting\"},\"id\":\"upjm\",\"name\":\"hfxobbcswsrtj\",\"type\":\"iplrbpbewtghfgb\"}],\"nextLink\":\"gw\"}") .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("rbnlankxmyskp", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, + Assertions.assertEquals("kauhashsfwxo", model.value().get(0).privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.APPROVED, model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tkcxywnytnrsy", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals(ActionsRequired.NONE, + Assertions.assertEquals("cugicjoox", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals(ActionsRequired.RECREATE, model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("cuh", model.nextLink()); + Assertions.assertEquals("gw", 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 index 67794b005177..d8f465ac5ed1 100644 --- 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 @@ -16,26 +16,26 @@ 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\"}") + "{\"privateEndpoint\":{\"id\":\"wmdwzjeiachboo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"osfqpteehzzv\",\"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("wmdwzjeiachboo", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("osfqpteehzzv", 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)); + PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpoint().withId("wmdwzjeiachboo")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.REJECTED) + .withDescription("osfqpteehzzv") + .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("wmdwzjeiachboo", model.privateEndpoint().id()); + Assertions.assertEquals(ConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("osfqpteehzzv", 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 index bea13a811b75..b2aeb5e4e424 100644 --- 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 @@ -11,14 +11,14 @@ 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()); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"mzinpvswjdk\"}").toObject(PrivateEndpoint.class); + Assertions.assertEquals("mzinpvswjdk", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("dcuf"); + PrivateEndpoint model = new PrivateEndpoint().withId("mzinpvswjdk"); model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("dcuf", model.id()); + Assertions.assertEquals("mzinpvswjdk", 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 index ec557f9cdff2..c83db392b574 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\":\"kthfui\",\"requiredMembers\":[\"dsfcpkvxodpuoz\",\"yzydagfuaxbezyi\",\"okktwhrdxw\",\"ywqsmbsurexim\"],\"requiredZoneNames\":[\"ocfs\"]},\"id\":\"s\",\"name\":\"mddystkiiux\",\"type\":\"qyud\"}") + "{\"properties\":{\"groupId\":\"pk\",\"requiredMembers\":[\"dpuozmyz\",\"dagfuaxbezyiuok\",\"twhrdxwzywqsm\",\"surex\"],\"requiredZoneNames\":[\"ryocfsfksymdd\"]},\"id\":\"tki\",\"name\":\"uxh\",\"type\":\"yudxorrqnbp\"}") .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("ocfs", model.requiredZoneNames().get(0)); + Assertions.assertEquals("ryocfsfksymdd", 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 66fa8f6187a0..512b16b97182 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\":\"wwzjuqkhrsajiwku\",\"requiredMembers\":[\"skghsauuimj\"],\"requiredZoneNames\":[\"ied\",\"ugidyjrr\",\"byao\",\"v\"]},\"id\":\"csonpclhoco\",\"name\":\"slkevle\",\"type\":\"gz\"}],\"nextLink\":\"u\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"n\",\"requiredMembers\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"],\"requiredZoneNames\":[\"obpxjmflbvvn\",\"hrk\",\"ciwwzjuqkhr\",\"ajiwkuo\"]},\"id\":\"skghsauuimj\",\"name\":\"vxieduugidyj\",\"type\":\"rfbyaosvexcso\"}],\"nextLink\":\"clhocohsl\"}") .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("ied", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("u", model.nextLink()); + Assertions.assertEquals("obpxjmflbvvn", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("clhocohsl", 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 c4e5da744ec2..ffb6f23c5508 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,9 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"rrqnbpoczvyifqrv\",\"requiredMembers\":[\"jsllrmv\",\"d\",\"watkpnpulexxb\"],\"requiredZoneNames\":[\"truwiqzb\",\"j\",\"sovmyokacspkwl\",\"zdobpxjmflbvvnch\"]}") + PrivateLinkResourceProperties model = BinaryData + .fromString("{\"groupId\":\"zvyifqrvkdvj\",\"requiredMembers\":[\"rm\"],\"requiredZoneNames\":[\"f\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("truwiqzb", model.requiredZoneNames().get(0)); + Assertions.assertEquals("f", 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 index fdf302cb4485..9d98711264e2 100644 --- 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 @@ -13,23 +13,23 @@ 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()); + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"status\":\"Disconnected\",\"description\":\"od\",\"actionsRequired\":\"None\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.status()); + Assertions.assertEquals("od", 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") + = new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) + .withDescription("od") .withActionsRequired(ActionsRequired.NONE); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(ConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("pymzidnsezcxtbzs", model.description()); + Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.status()); + Assertions.assertEquals("od", model.description()); Assertions.assertEquals(ActionsRequired.NONE, model.actionsRequired()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ProgressPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ProgressPropertiesTests.java new file mode 100644 index 000000000000..c8adb1e01df8 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ProgressPropertiesTests.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.ProgressProperties; +import org.junit.jupiter.api.Assertions; + +public final class ProgressPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProgressProperties model = BinaryData.fromString("{\"percentage\":\"a\"}").toObject(ProgressProperties.class); + Assertions.assertEquals("a", model.percentage()); + } +} 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 index 30d735b37793..2d6afb4ad100 100644 --- 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 @@ -12,14 +12,14 @@ 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()); + QuarantinePolicy model = BinaryData.fromString("{\"status\":\"disabled\"}").toObject(QuarantinePolicy.class); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuarantinePolicy model = new QuarantinePolicy().withStatus(PolicyStatus.ENABLED); + QuarantinePolicy model = new QuarantinePolicy().withStatus(PolicyStatus.DISABLED); model = BinaryData.fromObject(model).toObject(QuarantinePolicy.class); - Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); } } 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 e1678e7c0f1d..1e0014b197cf 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,21 +5,31 @@ package com.azure.resourcemanager.containerregistry.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope; 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\"}").toObject(RegistryNameCheckRequest.class); - Assertions.assertEquals("mdajv", model.name()); + RegistryNameCheckRequest model = BinaryData.fromString( + "{\"name\":\"ounqecano\",\"resourceGroupName\":\"upfh\",\"autoGeneratedDomainNameLabelScope\":\"ResourceGroupReuse\"}") + .toObject(RegistryNameCheckRequest.class); + Assertions.assertEquals("ounqecano", model.name()); + Assertions.assertEquals("upfh", model.resourceGroupName()); + Assertions.assertEquals(AutoGeneratedDomainNameLabelScope.RESOURCE_GROUP_REUSE, + model.autoGeneratedDomainNameLabelScope()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("mdajv"); + RegistryNameCheckRequest model = new RegistryNameCheckRequest().withName("ounqecano") + .withResourceGroupName("upfh") + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.RESOURCE_GROUP_REUSE); model = BinaryData.fromObject(model).toObject(RegistryNameCheckRequest.class); - Assertions.assertEquals("mdajv", model.name()); + Assertions.assertEquals("ounqecano", model.name()); + Assertions.assertEquals("upfh", model.resourceGroupName()); + Assertions.assertEquals(AutoGeneratedDomainNameLabelScope.RESOURCE_GROUP_REUSE, + model.autoGeneratedDomainNameLabelScope()); } } 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 4dae35f6dc03..f1cdef63047f 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 @@ -11,11 +11,12 @@ public final class RegistryNameStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RegistryNameStatusInner model = BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"unqecanoae\",\"message\":\"fhyhltrpmopjmcma\"}") + RegistryNameStatusInner model = BinaryData.fromString( + "{\"availableLoginServerName\":\"rpmopjmc\",\"nameAvailable\":false,\"reason\":\"okth\",\"message\":\"iuaod\"}") .toObject(RegistryNameStatusInner.class); - Assertions.assertTrue(model.nameAvailable()); - Assertions.assertEquals("unqecanoae", model.reason()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.message()); + Assertions.assertEquals("rpmopjmc", model.availableLoginServerName()); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals("okth", model.reason()); + Assertions.assertEquals("iuaod", 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 index a5300dbe3e1c..fe42d213c2a3 100644 --- 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 @@ -12,9 +12,9 @@ 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); + RegistryPassword model + = BinaryData.fromString("{\"name\":\"password2\",\"value\":\"aamdect\"}").toObject(RegistryPassword.class); Assertions.assertEquals(PasswordName.PASSWORD2, model.name()); - Assertions.assertEquals("bqvudwxdndn", model.value()); + Assertions.assertEquals("aamdect", model.value()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistrySyncResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistrySyncResultTests.java new file mode 100644 index 000000000000..2da6c87d3b71 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/RegistrySyncResultTests.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.RegistrySyncResult; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class RegistrySyncResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegistrySyncResult model = BinaryData.fromString( + "{\"syncTrigger\":\"ManualResync\",\"syncState\":\"Failed\",\"lastSyncStartTime\":\"2020-12-29T23:09:22Z\",\"lastSyncEndTime\":\"2021-03-06T06:21:06Z\",\"lastSuccessfulSyncEndTime\":\"2021-10-27T07:53:54Z\"}") + .toObject(RegistrySyncResult.class); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T23:09:22Z"), model.lastSyncStartTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T06:21:06Z"), model.lastSyncEndTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T07:53:54Z"), model.lastSuccessfulSyncEndTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegistrySyncResult model + = new RegistrySyncResult().withLastSyncStartTime(OffsetDateTime.parse("2020-12-29T23:09:22Z")) + .withLastSyncEndTime(OffsetDateTime.parse("2021-03-06T06:21:06Z")) + .withLastSuccessfulSyncEndTime(OffsetDateTime.parse("2021-10-27T07:53:54Z")); + model = BinaryData.fromObject(model).toObject(RegistrySyncResult.class); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T23:09:22Z"), model.lastSyncStartTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T06:21:06Z"), model.lastSyncEndTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T07:53:54Z"), model.lastSuccessfulSyncEndTime()); + } +} 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 index a32b53d7ae4f..8c7f03283f59 100644 --- 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 @@ -13,11 +13,11 @@ 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\"}]}") + "{\"value\":[{\"name\":\"ndnvo\",\"limit\":4292877192766299113,\"currentValue\":3293446474919179561,\"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()); + Assertions.assertEquals("ndnvo", model.value().get(0).name()); + Assertions.assertEquals(4292877192766299113L, model.value().get(0).limit()); + Assertions.assertEquals(3293446474919179561L, model.value().get(0).currentValue()); + Assertions.assertEquals(RegistryUsageUnit.COUNT, 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 index 4bb3ba605df3..270c19a12be2 100644 --- 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 @@ -13,11 +13,11 @@ 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\"}") + "{\"name\":\"cglhslazjdyggdt\",\"limit\":8229970615227219703,\"currentValue\":3773741125972458525,\"unit\":\"Bytes\"}") .toObject(RegistryUsage.class); - Assertions.assertEquals("alhbx", model.name()); - Assertions.assertEquals(65515238204620048L, model.limit()); - Assertions.assertEquals(2136882508954141287L, model.currentValue()); + Assertions.assertEquals("cglhslazjdyggdt", model.name()); + Assertions.assertEquals(8229970615227219703L, model.limit()); + Assertions.assertEquals(3773741125972458525L, 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 index 67480b86bc46..a30947557951 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,24 +15,24 @@ public final class ReplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"qik\",\"message\":\"bovpl\",\"timestamp\":\"2021-08-16T02:09:31Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"gu\",\"tags\":{\"sxnkjzkdeslpvlo\":\"mkfssxqukkfplgm\",\"baiuebbaumny\":\"wiyighxpkdw\",\"txp\":\"upedeojnabckhs\"},\"id\":\"ie\",\"name\":\"tfhvpesapskrdqmh\",\"type\":\"jdhtldwkyzxu\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"hjkbegibtnmxieb\",\"message\":\"aloayqcgwrtzju\",\"timestamp\":\"2021-08-18T20:27:18Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Disabled\"},\"location\":\"xongmtsavjcbpwxq\",\"tags\":{\"rwmdyvxqtay\":\"knftguvriuh\",\"ibycno\":\"iwwroyqbexrmc\",\"nmefqsgzvahapj\":\"v\",\"zlmwlxkvugfhz\":\"zhpvgqzcjrvxd\"},\"id\":\"vawjvzunlu\",\"name\":\"hnnpr\",\"type\":\"xipeilpjzuaejx\"}") .toObject(ReplicationInner.class); - Assertions.assertEquals("gu", model.location()); - Assertions.assertEquals("mkfssxqukkfplgm", model.tags().get("sxnkjzkdeslpvlo")); + Assertions.assertEquals("xongmtsavjcbpwxq", model.location()); + Assertions.assertEquals("knftguvriuh", model.tags().get("rwmdyvxqtay")); 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("gu") - .withTags( - mapOf("sxnkjzkdeslpvlo", "mkfssxqukkfplgm", "baiuebbaumny", "wiyighxpkdw", "txp", "upedeojnabckhs")) + ReplicationInner model = new ReplicationInner().withLocation("xongmtsavjcbpwxq") + .withTags(mapOf("rwmdyvxqtay", "knftguvriuh", "ibycno", "iwwroyqbexrmc", "nmefqsgzvahapj", "v", + "zlmwlxkvugfhz", "zhpvgqzcjrvxd")) .withRegionEndpointEnabled(false) .withZoneRedundancy(ZoneRedundancy.DISABLED); model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals("gu", model.location()); - Assertions.assertEquals("mkfssxqukkfplgm", model.tags().get("sxnkjzkdeslpvlo")); + Assertions.assertEquals("xongmtsavjcbpwxq", model.location()); + Assertions.assertEquals("knftguvriuh", model.tags().get("rwmdyvxqtay")); 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/ReplicationListResultTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/ReplicationListResultTests.java index d1aad8b93226..ae4abcacc67e 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\":\"bgyepsbj\",\"message\":\"zq\",\"timestamp\":\"2021-06-08T10:05:58Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"eef\",\"tags\":{\"dsuyonobgla\":\"fqkquj\",\"tcc\":\"cq\"},\"id\":\"g\",\"name\":\"udxytlmoyrx\",\"type\":\"wfudwpzntxhdzhl\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":{\"displayStatus\":\"kfrlhrxsbky\",\"message\":\"ycanuzbpzkafku\",\"timestamp\":\"2021-04-24T14:26:07Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"ehhseyvjusrts\",\"tags\":{\"elmqk\":\"pkdeemaofmxagkvt\",\"hcdhmdual\":\"hahvljuahaq\"},\"id\":\"exq\",\"name\":\"vfadmws\",\"type\":\"crgvxpvgom\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"gwb\",\"message\":\"beldawkzbaliourq\",\"timestamp\":\"2021-02-03T12:11Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"hsfwxosowzxcug\",\"tags\":{\"wfvovbv\":\"ooxdjebwpuc\",\"jrwjueiotwm\":\"euecivyhzceuoj\",\"rjaw\":\"dytdxwitx\"},\"id\":\"qwgxhniskx\",\"name\":\"bkpyc\",\"type\":\"klwndnhjdauwhv\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":{\"displayStatus\":\"dhxujznbmpo\",\"message\":\"wpr\",\"timestamp\":\"2021-01-10T20:10:28Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"},\"location\":\"upjm\",\"tags\":{\"riplrbpbewtg\":\"xobbcswsrt\",\"c\":\"fgb\",\"gibtnm\":\"wxzvlvqhjkb\"},\"id\":\"iebwwaloayqcgwrt\",\"name\":\"j\",\"type\":\"zg\"}],\"nextLink\":\"zmh\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"status\":{\"displayStatus\":\"oekqvk\",\"message\":\"nsmvbxwyj\",\"timestamp\":\"2021-08-23T09:42:03Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Enabled\"},\"location\":\"lnjixisxya\",\"tags\":{\"exznelixhnr\":\"yaqcslyjpkiidz\",\"nalaulppg\":\"tfolhbnx\",\"gvpgy\":\"dtpnapnyiropuhp\",\"n\":\"gqgitxmedjvcsl\"},\"id\":\"wwncwzzhxgk\",\"name\":\"rmgucnap\",\"type\":\"t\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":{\"displayStatus\":\"pt\",\"message\":\"ygpfqb\",\"timestamp\":\"2021-01-13T17:58:58Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"},\"location\":\"qrhhu\",\"tags\":{\"ahzxctobgbk\":\"ppcqeqxolz\",\"mgrcfbu\":\"moizpos\",\"mjh\":\"rmfqjhhkxbpvj\"},\"id\":\"xjyngudivk\",\"name\":\"tswb\",\"type\":\"qzvszjf\"},{\"properties\":{\"provisioningState\":\"Updating\",\"status\":{\"displayStatus\":\"xxivetv\",\"message\":\"qaqtdoqmcbxvwvxy\",\"timestamp\":\"2021-08-09T15:31:17Z\"},\"regionEndpointEnabled\":true,\"zoneRedundancy\":\"Disabled\"},\"location\":\"obl\",\"tags\":{\"bkrvrnsvshqj\":\"blmpewww\"},\"id\":\"hxcr\",\"name\":\"bfovasrruvwbhsq\",\"type\":\"sub\"}],\"nextLink\":\"jbi\"}") .toObject(ReplicationListResult.class); - Assertions.assertEquals("eef", model.value().get(0).location()); - Assertions.assertEquals("fqkquj", model.value().get(0).tags().get("dsuyonobgla")); - Assertions.assertFalse(model.value().get(0).regionEndpointEnabled()); + Assertions.assertEquals("lnjixisxya", model.value().get(0).location()); + Assertions.assertEquals("yaqcslyjpkiidz", model.value().get(0).tags().get("exznelixhnr")); + Assertions.assertTrue(model.value().get(0).regionEndpointEnabled()); Assertions.assertEquals(ZoneRedundancy.ENABLED, model.value().get(0).zoneRedundancy()); - Assertions.assertEquals("zmh", model.nextLink()); + Assertions.assertEquals("jbi", 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 cd00b1b1f5c2..4c198ccfcb34 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,7 +13,7 @@ public final class ReplicationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"status\":{\"displayStatus\":\"ws\",\"message\":\"svlxotogtwrup\",\"timestamp\":\"2021-08-21T23:24:20Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"}") + "{\"provisioningState\":\"Failed\",\"status\":{\"displayStatus\":\"kzbbtd\",\"message\":\"mv\",\"timestamp\":\"2021-02-24T15:47:12Z\"},\"regionEndpointEnabled\":false,\"zoneRedundancy\":\"Enabled\"}") .toObject(ReplicationProperties.class); Assertions.assertFalse(model.regionEndpointEnabled()); Assertions.assertEquals(ZoneRedundancy.ENABLED, model.zoneRedundancy()); 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 452749a20c8a..9ebb9f73be38 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,20 +13,19 @@ public final class ReplicationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReplicationUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"fcnj\":\"kvceoveilovnotyf\",\"nxdhbt\":\"k\",\"nermcl\":\"kphywpnvjto\"},\"properties\":{\"regionEndpointEnabled\":false}}") - .toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("kvceoveilovnotyf", model.tags().get("fcnj")); + ReplicationUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"yofd\":\"hkfpbs\"},\"properties\":{\"regionEndpointEnabled\":false}}") + .toObject(ReplicationUpdateParameters.class); + Assertions.assertEquals("hkfpbs", model.tags().get("yofd")); Assertions.assertFalse(model.regionEndpointEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReplicationUpdateParameters model = new ReplicationUpdateParameters() - .withTags(mapOf("fcnj", "kvceoveilovnotyf", "nxdhbt", "k", "nermcl", "kphywpnvjto")) - .withRegionEndpointEnabled(false); + ReplicationUpdateParameters model + = new ReplicationUpdateParameters().withTags(mapOf("yofd", "hkfpbs")).withRegionEndpointEnabled(false); model = BinaryData.fromObject(model).toObject(ReplicationUpdateParameters.class); - Assertions.assertEquals("kvceoveilovnotyf", model.tags().get("fcnj")); + Assertions.assertEquals("hkfpbs", model.tags().get("yofd")); 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 eb3d5ca7fadd..9c3d02c9abf0 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 @@ -12,12 +12,12 @@ public final class RequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Request model = BinaryData.fromString( - "{\"id\":\"xqhuexm\",\"addr\":\"tlstvlzywem\",\"host\":\"rncsdtclu\",\"method\":\"ypbsfgytguslfead\",\"useragent\":\"gq\"}") + "{\"id\":\"pqqmted\",\"addr\":\"mmji\",\"host\":\"eozphv\",\"method\":\"uyqncygupkvipmd\",\"useragent\":\"wx\"}") .toObject(Request.class); - Assertions.assertEquals("xqhuexm", model.id()); - Assertions.assertEquals("tlstvlzywem", model.addr()); - Assertions.assertEquals("rncsdtclu", model.host()); - Assertions.assertEquals("ypbsfgytguslfead", model.method()); - Assertions.assertEquals("gq", model.useragent()); + Assertions.assertEquals("pqqmted", model.id()); + Assertions.assertEquals("mmji", model.addr()); + Assertions.assertEquals("eozphv", model.host()); + Assertions.assertEquals("uyqncygupkvipmd", model.method()); + Assertions.assertEquals("wx", 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 index ab6705bd6eb9..11b2287ca5dd 100644 --- 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 @@ -13,17 +13,17 @@ 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\"}") + .fromString("{\"days\":103063252,\"lastUpdatedTime\":\"2021-02-05T13:43:57Z\",\"status\":\"enabled\"}") .toObject(RetentionPolicy.class); - Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(103063252, 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); + RetentionPolicy model = new RetentionPolicy().withDays(103063252).withStatus(PolicyStatus.ENABLED); model = BinaryData.fromObject(model).toObject(RetentionPolicy.class); - Assertions.assertEquals(1398747720, model.days()); + Assertions.assertEquals(103063252, 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 index 0b5168229b97..cfc6c04cb3b9 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,18 +13,18 @@ public final class ScopeMapInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScopeMapInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"ngmtsavjcb\",\"type\":\"xqpsrknftguv\",\"creationDate\":\"2021-11-24T12:31:24Z\",\"provisioningState\":\"Canceled\",\"actions\":[\"wmdyvxqtay\",\"iwwroyqbexrmc\",\"ibycno\"]},\"id\":\"knme\",\"name\":\"qsgzvahapj\",\"type\":\"zhpvgqzcjrvxd\"}") + "{\"properties\":{\"description\":\"pybsrfbjfdtw\",\"type\":\"otftpvjzbexilz\",\"creationDate\":\"2021-02-03T15:32:57Z\",\"provisioningState\":\"Deleting\",\"actions\":[\"vwpm\",\"taruoujmkcj\",\"wqytjrybnwjewgdr\",\"ervnaenqpehi\"]},\"id\":\"oygmift\",\"name\":\"nzdndslgna\",\"type\":\"qig\"}") .toObject(ScopeMapInner.class); - Assertions.assertEquals("ngmtsavjcb", model.description()); - Assertions.assertEquals("wmdyvxqtay", model.actions().get(0)); + Assertions.assertEquals("pybsrfbjfdtw", model.description()); + Assertions.assertEquals("vwpm", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapInner model = new ScopeMapInner().withDescription("ngmtsavjcb") - .withActions(Arrays.asList("wmdyvxqtay", "iwwroyqbexrmc", "ibycno")); + ScopeMapInner model = new ScopeMapInner().withDescription("pybsrfbjfdtw") + .withActions(Arrays.asList("vwpm", "taruoujmkcj", "wqytjrybnwjewgdr", "ervnaenqpehi")); model = BinaryData.fromObject(model).toObject(ScopeMapInner.class); - Assertions.assertEquals("ngmtsavjcb", model.description()); - Assertions.assertEquals("wmdyvxqtay", model.actions().get(0)); + Assertions.assertEquals("pybsrfbjfdtw", model.description()); + Assertions.assertEquals("vwpm", 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 2b9e744f0a97..9401528517a9 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\":\"yjpkiidzyexz\",\"type\":\"lixhnrztfol\",\"creationDate\":\"2021-01-02T16:04:01Z\",\"provisioningState\":\"Updating\",\"actions\":[\"alaulppggdtpnapn\",\"iropuhpigvpgylg\",\"git\"]},\"id\":\"edjvcslynqw\",\"name\":\"ncw\",\"type\":\"zhxgktrmgucn\"},{\"properties\":{\"description\":\"t\",\"type\":\"ellwptfdy\",\"creationDate\":\"2020-12-31T02:22:45Z\",\"provisioningState\":\"Creating\",\"actions\":[\"ac\",\"op\",\"fqrhhuaopppc\",\"eqx\"]},\"id\":\"z\",\"name\":\"ahzxctobgbk\",\"type\":\"moizpos\"}],\"nextLink\":\"grcfb\"}") + "{\"value\":[{\"properties\":{\"description\":\"n\",\"type\":\"shhszhedplvwiw\",\"creationDate\":\"2021-06-28T18:18:03Z\",\"provisioningState\":\"Deleting\",\"actions\":[\"esl\",\"nkww\",\"pp\",\"flcxoga\"]},\"id\":\"onz\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}],\"nextLink\":\"dagxtibqd\"}") .toObject(ScopeMapListResult.class); - Assertions.assertEquals("yjpkiidzyexz", model.value().get(0).description()); - Assertions.assertEquals("alaulppggdtpnapn", model.value().get(0).actions().get(0)); - Assertions.assertEquals("grcfb", model.nextLink()); + Assertions.assertEquals("n", model.value().get(0).description()); + Assertions.assertEquals("esl", model.value().get(0).actions().get(0)); + Assertions.assertEquals("dagxtibqd", 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 8fba2072fa1b..adf0f559acf1 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\":\"lmwlxkvugfhzo\",\"type\":\"wjvzunluthnn\",\"creationDate\":\"2021-03-11T05:06:45Z\",\"provisioningState\":\"Succeeded\",\"actions\":[\"eilpjzuaejxdu\",\"tskzbbtdzumveek\",\"pwo\",\"uh\"]}") + "{\"description\":\"duhavhqlkt\",\"type\":\"maqolbgycduie\",\"creationDate\":\"2021-01-07T02:54:59Z\",\"provisioningState\":\"Creating\",\"actions\":[\"mvaolps\"]}") .toObject(ScopeMapProperties.class); - Assertions.assertEquals("lmwlxkvugfhzo", model.description()); - Assertions.assertEquals("eilpjzuaejxdu", model.actions().get(0)); + Assertions.assertEquals("duhavhqlkt", model.description()); + Assertions.assertEquals("mvaolps", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapProperties model = new ScopeMapProperties().withDescription("lmwlxkvugfhzo") - .withActions(Arrays.asList("eilpjzuaejxdu", "tskzbbtdzumveek", "pwo", "uh")); + ScopeMapProperties model + = new ScopeMapProperties().withDescription("duhavhqlkt").withActions(Arrays.asList("mvaolps")); model = BinaryData.fromObject(model).toObject(ScopeMapProperties.class); - Assertions.assertEquals("lmwlxkvugfhzo", model.description()); - Assertions.assertEquals("eilpjzuaejxdu", model.actions().get(0)); + Assertions.assertEquals("duhavhqlkt", model.description()); + Assertions.assertEquals("mvaolps", 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 b5bcc1e60e20..e7b20ede37e8 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,20 +12,20 @@ public final class ScopeMapPropertiesUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScopeMapPropertiesUpdateParameters model = BinaryData - .fromString("{\"description\":\"ouwaboekqvkeln\",\"actions\":[\"bxwyjsflhhcaa\",\"n\",\"ixisxyawjoy\"]}") + ScopeMapPropertiesUpdateParameters model = BinaryData.fromString( + "{\"description\":\"blylpstdbh\",\"actions\":[\"rzdzucerscdnt\",\"evfiwjmygt\",\"sslswtmweriof\",\"pyqs\"]}") .toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("ouwaboekqvkeln", model.description()); - Assertions.assertEquals("bxwyjsflhhcaa", model.actions().get(0)); + Assertions.assertEquals("blylpstdbh", model.description()); + Assertions.assertEquals("rzdzucerscdnt", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScopeMapPropertiesUpdateParameters model - = new ScopeMapPropertiesUpdateParameters().withDescription("ouwaboekqvkeln") - .withActions(Arrays.asList("bxwyjsflhhcaa", "n", "ixisxyawjoy")); + = new ScopeMapPropertiesUpdateParameters().withDescription("blylpstdbh") + .withActions(Arrays.asList("rzdzucerscdnt", "evfiwjmygt", "sslswtmweriof", "pyqs")); model = BinaryData.fromObject(model).toObject(ScopeMapPropertiesUpdateParameters.class); - Assertions.assertEquals("ouwaboekqvkeln", model.description()); - Assertions.assertEquals("bxwyjsflhhcaa", model.actions().get(0)); + Assertions.assertEquals("blylpstdbh", model.description()); + Assertions.assertEquals("rzdzucerscdnt", 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 a2157f692f11..45de83e1bfb5 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 @@ -12,19 +12,19 @@ public final class ScopeMapUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScopeMapUpdateParameters model - = BinaryData.fromString("{\"properties\":{\"description\":\"bsjyofdx\",\"actions\":[\"sd\"]}}") - .toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("bsjyofdx", model.description()); - Assertions.assertEquals("sd", model.actions().get(0)); + ScopeMapUpdateParameters model = BinaryData.fromString( + "{\"properties\":{\"description\":\"lfmmdnbbglzpswi\",\"actions\":[\"cwyhzdxssa\",\"bzmnvdfznud\",\"od\",\"xzb\"]}}") + .toObject(ScopeMapUpdateParameters.class); + Assertions.assertEquals("lfmmdnbbglzpswi", model.description()); + Assertions.assertEquals("cwyhzdxssa", model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScopeMapUpdateParameters model - = new ScopeMapUpdateParameters().withDescription("bsjyofdx").withActions(Arrays.asList("sd")); + ScopeMapUpdateParameters model = new ScopeMapUpdateParameters().withDescription("lfmmdnbbglzpswi") + .withActions(Arrays.asList("cwyhzdxssa", "bzmnvdfznud", "od", "xzb")); model = BinaryData.fromObject(model).toObject(ScopeMapUpdateParameters.class); - Assertions.assertEquals("bsjyofdx", model.description()); - Assertions.assertEquals("sd", model.actions().get(0)); + Assertions.assertEquals("lfmmdnbbglzpswi", model.description()); + Assertions.assertEquals("cwyhzdxssa", 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 index 8b5947e8d2de..a81817503914 100644 --- 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 @@ -12,14 +12,14 @@ 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()); + Sku model = BinaryData.fromString("{\"name\":\"Premium\",\"tier\":\"Classic\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.PREMIUM, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.CLASSIC); + Sku model = new Sku().withName(SkuName.PREMIUM); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.CLASSIC, model.name()); + Assertions.assertEquals(SkuName.PREMIUM, model.name()); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SoftDeletePolicyTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SoftDeletePolicyTests.java new file mode 100644 index 000000000000..29e152132c72 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/SoftDeletePolicyTests.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.PolicyStatus; +import com.azure.resourcemanager.containerregistry.models.SoftDeletePolicy; +import org.junit.jupiter.api.Assertions; + +public final class SoftDeletePolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SoftDeletePolicy model = BinaryData + .fromString( + "{\"retentionDays\":1555370196,\"lastUpdatedTime\":\"2021-06-16T03:50:29Z\",\"status\":\"enabled\"}") + .toObject(SoftDeletePolicy.class); + Assertions.assertEquals(1555370196, model.retentionDays()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SoftDeletePolicy model = new SoftDeletePolicy().withRetentionDays(1555370196).withStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(SoftDeletePolicy.class); + Assertions.assertEquals(1555370196, model.retentionDays()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); + } +} 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 c3d74aceffef..183a32b180e4 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\":\"olppvksrpqvujz\",\"instanceID\":\"ehtwdwrft\"}") - .toObject(Source.class); - Assertions.assertEquals("olppvksrpqvujz", model.addr()); - Assertions.assertEquals("ehtwdwrft", model.instanceId()); + Source model + = BinaryData.fromString("{\"addr\":\"xhojuj\",\"instanceID\":\"pelmcuvhixbjxyf\"}").toObject(Source.class); + Assertions.assertEquals("xhojuj", model.addr()); + Assertions.assertEquals("pelmcuvhixbjxyf", 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 index e0971c61d6d8..b3e7216b1229 100644 --- 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 @@ -10,8 +10,9 @@ 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\"}") + Status model = BinaryData + .fromString( + "{\"displayStatus\":\"gmbmbexppbh\",\"message\":\"qrolfpf\",\"timestamp\":\"2021-03-16T09:26:04Z\"}") .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 index b5e9151c9e26..ae44b6f2a6e1 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\":\"zahmgkbrpyydhibn\",\"syncWindow\":\"PT32H13M12S\",\"messageTtl\":\"PT95H25M16S\"}") + "{\"schedule\":\"juahaquhcdhmdual\",\"syncWindow\":\"PT135H1M42S\",\"messageTtl\":\"PT157H57M14S\"}") .toObject(SyncUpdateProperties.class); - Assertions.assertEquals("zahmgkbrpyydhibn", model.schedule()); - Assertions.assertEquals(Duration.parse("PT32H13M12S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT95H25M16S"), model.messageTtl()); + Assertions.assertEquals("juahaquhcdhmdual", model.schedule()); + Assertions.assertEquals(Duration.parse("PT135H1M42S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT157H57M14S"), model.messageTtl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("zahmgkbrpyydhibn") - .withSyncWindow(Duration.parse("PT32H13M12S")) - .withMessageTtl(Duration.parse("PT95H25M16S")); + SyncUpdateProperties model = new SyncUpdateProperties().withSchedule("juahaquhcdhmdual") + .withSyncWindow(Duration.parse("PT135H1M42S")) + .withMessageTtl(Duration.parse("PT157H57M14S")); model = BinaryData.fromObject(model).toObject(SyncUpdateProperties.class); - Assertions.assertEquals("zahmgkbrpyydhibn", model.schedule()); - Assertions.assertEquals(Duration.parse("PT32H13M12S"), model.syncWindow()); - Assertions.assertEquals(Duration.parse("PT95H25M16S"), model.messageTtl()); + Assertions.assertEquals("juahaquhcdhmdual", model.schedule()); + Assertions.assertEquals(Duration.parse("PT135H1M42S"), model.syncWindow()); + Assertions.assertEquals(Duration.parse("PT157H57M14S"), 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 6fdbd8b91399..72ef423b73d8 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\":\"swhccsphk\",\"size\":798516797680778098,\"digest\":\"tqscywug\",\"length\":3235940224954586497,\"repository\":\"h\",\"url\":\"bwemhairs\",\"tag\":\"gzd\",\"name\":\"swe\",\"version\":\"qwdxggicc\"}") + "{\"mediaType\":\"rnjwmw\",\"size\":5636439164832410067,\"digest\":\"azej\",\"length\":12239624100997197,\"repository\":\"gfhsxttaugzxn\",\"url\":\"azpxdtnkdmkqjjl\",\"tag\":\"envrkpyouaibrebq\",\"name\":\"ysjkixqtnqttez\",\"version\":\"fffiak\"}") .toObject(Target.class); - Assertions.assertEquals("swhccsphk", model.mediaType()); - Assertions.assertEquals(798516797680778098L, model.size()); - Assertions.assertEquals("tqscywug", model.digest()); - Assertions.assertEquals(3235940224954586497L, model.length()); - Assertions.assertEquals("h", model.repository()); - Assertions.assertEquals("bwemhairs", model.url()); - Assertions.assertEquals("gzd", model.tag()); - Assertions.assertEquals("swe", model.name()); - Assertions.assertEquals("qwdxggicc", model.version()); + Assertions.assertEquals("rnjwmw", model.mediaType()); + Assertions.assertEquals(5636439164832410067L, model.size()); + Assertions.assertEquals("azej", model.digest()); + Assertions.assertEquals(12239624100997197L, model.length()); + Assertions.assertEquals("gfhsxttaugzxn", model.repository()); + Assertions.assertEquals("azpxdtnkdmkqjjl", model.url()); + Assertions.assertEquals("envrkpyouaibrebq", model.tag()); + Assertions.assertEquals("ysjkixqtnqttez", model.name()); + Assertions.assertEquals("fffiak", 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 388f4a517665..15e1666c974d 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 @@ -11,7 +11,7 @@ public final class TlsCertificatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TlsCertificateProperties model - = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"tvfcivfsn\"}") + = BinaryData.fromString("{\"type\":\"LocalDirectory\",\"location\":\"mclfplphoxuscr\"}") .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 56d9578d4d0a..1e003f94e837 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 @@ -10,8 +10,9 @@ public final class TlsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TlsProperties model = BinaryData.fromString( - "{\"status\":\"Disabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"lqdqgbiqylihka\"}}") + TlsProperties model = BinaryData + .fromString( + "{\"status\":\"Enabled\",\"certificate\":{\"type\":\"LocalDirectory\",\"location\":\"kphywpnvjto\"}}") .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 index 95c7c7ad438d..640a7e22930f 100644 --- 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 @@ -14,21 +14,21 @@ 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\"}") + "{\"creationTime\":\"2021-08-05T23:46:07Z\",\"expiry\":\"2021-04-26T15:47:13Z\",\"name\":\"password1\",\"value\":\"zsqpjhvmdajvny\"}") .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()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T23:46:07Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T15:47:13Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD1, 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); + TokenPassword model = new TokenPassword().withCreationTime(OffsetDateTime.parse("2021-08-05T23:46:07Z")) + .withExpiry(OffsetDateTime.parse("2021-04-26T15:47:13Z")) + .withName(TokenPasswordName.PASSWORD1); 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()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T23:46:07Z"), model.creationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T15:47:13Z"), model.expiry()); + Assertions.assertEquals(TokenPasswordName.PASSWORD1, 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 index 26411220f210..51963a9788da 100644 --- 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 @@ -14,16 +14,16 @@ 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); + = BinaryData.fromString("{\"type\":\"Notary\",\"status\":\"enabled\"}").toObject(TrustPolicy.class); Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrustPolicy model = new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.DISABLED); + TrustPolicy model = new TrustPolicy().withType(TrustPolicyType.NOTARY).withStatus(PolicyStatus.ENABLED); model = BinaryData.fromObject(model).toObject(TrustPolicy.class); Assertions.assertEquals(TrustPolicyType.NOTARY, model.type()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.status()); + Assertions.assertEquals(PolicyStatus.ENABLED, 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 index 849c4ef33d62..8291a544038a 100644 --- 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 @@ -10,9 +10,8 @@ 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); + UserIdentityProperties model = BinaryData.fromString("{\"principalId\":\"j\",\"clientId\":\"dxob\"}") + .toObject(UserIdentityProperties.class); } @org.junit.jupiter.api.Test 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 a3c7d12a17c4..091990bb73e2 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\":{\"wtppjflcxogaoko\":\"iwubmwmbesldnk\",\"nsikvmkqzeqqkdl\":\"z\"},\"location\":\"fzxmhhvhgureodkw\",\"properties\":{\"serviceUri\":\"dagxtibqd\",\"customHeaders\":{\"zgx\":\"wakbogqxndl\"},\"status\":\"enabled\",\"scope\":\"plbpodxun\",\"actions\":[\"push\",\"push\",\"chart_delete\",\"chart_push\"]}}") + "{\"tags\":{\"irqtdqoa\":\"livpdt\"},\"location\":\"oruzfgsquyfxrxx\",\"properties\":{\"serviceUri\":\"ptramxj\",\"customHeaders\":{\"tdooaoj\":\"lwnwxuqlcvydyp\",\"nuj\":\"niodkooeb\",\"odtji\":\"emmsbvdkc\"},\"status\":\"enabled\",\"scope\":\"lfltka\",\"actions\":[\"chart_delete\",\"delete\",\"chart_push\",\"delete\"]}}") .toObject(WebhookCreateParameters.class); - Assertions.assertEquals("iwubmwmbesldnk", model.tags().get("wtppjflcxogaoko")); - Assertions.assertEquals("fzxmhhvhgureodkw", model.location()); - Assertions.assertEquals("dagxtibqd", model.serviceUri()); - Assertions.assertEquals("wakbogqxndl", model.customHeaders().get("zgx")); + Assertions.assertEquals("livpdt", model.tags().get("irqtdqoa")); + Assertions.assertEquals("oruzfgsquyfxrxx", model.location()); + Assertions.assertEquals("ptramxj", model.serviceUri()); + Assertions.assertEquals("lwnwxuqlcvydyp", model.customHeaders().get("tdooaoj")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("plbpodxun", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("lfltka", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_DELETE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookCreateParameters model - = new WebhookCreateParameters().withTags(mapOf("wtppjflcxogaoko", "iwubmwmbesldnk", "nsikvmkqzeqqkdl", "z")) - .withLocation("fzxmhhvhgureodkw") - .withServiceUri("dagxtibqd") - .withCustomHeaders(mapOf("zgx", "wakbogqxndl")) - .withStatus(WebhookStatus.ENABLED) - .withScope("plbpodxun") - .withActions(Arrays.asList(WebhookAction.PUSH, WebhookAction.PUSH, WebhookAction.CHART_DELETE, - WebhookAction.CHART_PUSH)); + WebhookCreateParameters model = new WebhookCreateParameters().withTags(mapOf("irqtdqoa", "livpdt")) + .withLocation("oruzfgsquyfxrxx") + .withServiceUri("ptramxj") + .withCustomHeaders(mapOf("tdooaoj", "lwnwxuqlcvydyp", "nuj", "niodkooeb", "odtji", "emmsbvdkc")) + .withStatus(WebhookStatus.ENABLED) + .withScope("lfltka") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE, WebhookAction.DELETE, WebhookAction.CHART_PUSH, + WebhookAction.DELETE)); model = BinaryData.fromObject(model).toObject(WebhookCreateParameters.class); - Assertions.assertEquals("iwubmwmbesldnk", model.tags().get("wtppjflcxogaoko")); - Assertions.assertEquals("fzxmhhvhgureodkw", model.location()); - Assertions.assertEquals("dagxtibqd", model.serviceUri()); - Assertions.assertEquals("wakbogqxndl", model.customHeaders().get("zgx")); + Assertions.assertEquals("livpdt", model.tags().get("irqtdqoa")); + Assertions.assertEquals("oruzfgsquyfxrxx", model.location()); + Assertions.assertEquals("ptramxj", model.serviceUri()); + Assertions.assertEquals("lwnwxuqlcvydyp", model.customHeaders().get("tdooaoj")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("plbpodxun", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("lfltka", model.scope()); + Assertions.assertEquals(WebhookAction.CHART_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 11d45476fab2..467f5b2727d3 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\":\"enabled\",\"scope\":\"gynduha\",\"actions\":[\"chart_push\",\"chart_delete\",\"chart_delete\"],\"provisioningState\":\"Updating\"},\"location\":\"maqolbgycduie\",\"tags\":{\"mmdnbbglzps\":\"ccymvaolpsslql\",\"adbzmnvdfznud\":\"iydmcwyhzdxs\",\"xzb\":\"od\",\"dzu\":\"cblylpstdbhhxsr\"},\"id\":\"erscdntne\",\"name\":\"fiwjmygtdssls\",\"type\":\"tmweriofzpyq\"}") + "{\"properties\":{\"status\":\"enabled\",\"scope\":\"xkgymareqnajxqu\",\"actions\":[\"quarantine\",\"push\"],\"provisioningState\":\"Deleting\"},\"location\":\"beddgssofw\",\"tags\":{\"rmnjijpx\":\"qal\",\"byxbaaabjy\":\"cqqudf\",\"zrtuzq\":\"ayffim\",\"fdnw\":\"gsexne\"},\"id\":\"wmewzsyy\",\"name\":\"euzsoi\",\"type\":\"judpfrxt\"}") .toObject(WebhookInner.class); - Assertions.assertEquals("maqolbgycduie", model.location()); - Assertions.assertEquals("ccymvaolpsslql", model.tags().get("mmdnbbglzps")); + Assertions.assertEquals("beddgssofw", model.location()); + Assertions.assertEquals("qal", model.tags().get("rmnjijpx")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("gynduha", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("xkgymareqnajxqu", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookInner model = new WebhookInner().withLocation("maqolbgycduie") - .withTags(mapOf("mmdnbbglzps", "ccymvaolpsslql", "adbzmnvdfznud", "iydmcwyhzdxs", "xzb", "od", "dzu", - "cblylpstdbhhxsr")) + WebhookInner model = new WebhookInner().withLocation("beddgssofw") + .withTags(mapOf("rmnjijpx", "qal", "byxbaaabjy", "cqqudf", "zrtuzq", "ayffim", "fdnw", "gsexne")) .withStatus(WebhookStatus.ENABLED) - .withScope("gynduha") - .withActions( - Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.CHART_DELETE, WebhookAction.CHART_DELETE)); + .withScope("xkgymareqnajxqu") + .withActions(Arrays.asList(WebhookAction.QUARANTINE, WebhookAction.PUSH)); model = BinaryData.fromObject(model).toObject(WebhookInner.class); - Assertions.assertEquals("maqolbgycduie", model.location()); - Assertions.assertEquals("ccymvaolpsslql", model.tags().get("mmdnbbglzps")); + Assertions.assertEquals("beddgssofw", model.location()); + Assertions.assertEquals("qal", model.tags().get("rmnjijpx")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("gynduha", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("xkgymareqnajxqu", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, 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 cec3fbf7919f..b6aa0f9ed47d 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\":\"enabled\",\"scope\":\"uyfta\",\"actions\":[\"quarantine\",\"quarantine\"],\"provisioningState\":\"Failed\"},\"location\":\"zvqtmnubexkp\",\"tags\":{\"mquxvypo\":\"mond\",\"smocmbq\":\"gkopkwhojvpajqgx\"},\"id\":\"qvmkcxo\",\"name\":\"apvhelxprgly\",\"type\":\"tddckcb\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"jxgciqibrh\",\"actions\":[\"delete\",\"delete\",\"push\",\"quarantine\"],\"provisioningState\":\"Canceled\"},\"location\":\"o\",\"tags\":{\"szdtmhrkwof\":\"bmrqyibahwfl\"},\"id\":\"yvoqa\",\"name\":\"piexpbtgiw\",\"type\":\"wo\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"hrtdtk\",\"actions\":[\"chart_push\",\"delete\"],\"provisioningState\":\"Deleting\"},\"location\":\"okulpiujwa\",\"tags\":{\"pqlpq\":\"pqiiobyuqe\",\"fbtkuwhhmhyk\":\"cciuqgbdbutau\",\"hkoymkcdyhbp\":\"joxafnndlpi\",\"reqnovvqfov\":\"kpw\"},\"id\":\"jxywsuws\",\"name\":\"rsndsytgadgvra\",\"type\":\"aeneqnzarrwl\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"fqka\",\"actions\":[\"chart_delete\"],\"provisioningState\":\"Deleting\"},\"location\":\"fpubjibwwi\",\"tags\":{\"ynfs\":\"hqkvpuvksgplsak\",\"jphuopxodlqi\":\"n\",\"slyzrpzbchckqq\":\"ntorzihleosjswsr\",\"suiizynkedyat\":\"qioxi\"},\"id\":\"wyhqmibzyhwits\",\"name\":\"ypyynpcdpumnzg\",\"type\":\"wznm\"}],\"nextLink\":\"iknsorgjh\"}") + "{\"value\":[{\"properties\":{\"status\":\"enabled\",\"scope\":\"gdknnqv\",\"actions\":[\"chart_push\",\"chart_push\",\"chart_push\"],\"provisioningState\":\"Updating\"},\"location\":\"rudsg\",\"tags\":{\"wjue\":\"mkycgra\"},\"id\":\"aeburuvdmo\",\"name\":\"s\",\"type\":\"zlxwabmqoefkifr\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"ujmqlgkfbtndoa\",\"actions\":[\"push\"],\"provisioningState\":\"Canceled\"},\"location\":\"ntuji\",\"tags\":{\"twwaezkojvdcpzf\":\"ed\"},\"id\":\"qouicybxarzgsz\",\"name\":\"foxciq\",\"type\":\"p\"},{\"properties\":{\"status\":\"enabled\",\"scope\":\"ciodhkhaz\",\"actions\":[\"delete\",\"delete\",\"quarantine\"],\"provisioningState\":\"Succeeded\"},\"location\":\"lwntoego\",\"tags\":{\"szzcmrvexztv\":\"bwh\"},\"id\":\"t\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"},{\"properties\":{\"status\":\"disabled\",\"scope\":\"yuuximerqfobwyzn\",\"actions\":[\"delete\",\"push\"],\"provisioningState\":\"Deleting\"},\"location\":\"pfhpagmhrskdsnfd\",\"tags\":{\"wpusdsttwvogv\":\"akgtdlmkkzevdlh\",\"qqmoaku\":\"bejdcn\",\"zr\":\"gm\",\"enuuzkopbm\":\"rdgrtw\"},\"id\":\"nrfdw\",\"name\":\"yuhhziu\",\"type\":\"efozbhdms\"}],\"nextLink\":\"mzqhoftrmaequi\"}") .toObject(WebhookListResult.class); - Assertions.assertEquals("zvqtmnubexkp", model.value().get(0).location()); - Assertions.assertEquals("mond", model.value().get(0).tags().get("mquxvypo")); + Assertions.assertEquals("rudsg", model.value().get(0).location()); + Assertions.assertEquals("mkycgra", model.value().get(0).tags().get("wjue")); Assertions.assertEquals(WebhookStatus.ENABLED, model.value().get(0).status()); - Assertions.assertEquals("uyfta", model.value().get(0).scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.value().get(0).actions().get(0)); - Assertions.assertEquals("iknsorgjh", model.nextLink()); + Assertions.assertEquals("gdknnqv", model.value().get(0).scope()); + Assertions.assertEquals(WebhookAction.CHART_PUSH, model.value().get(0).actions().get(0)); + Assertions.assertEquals("mzqhoftrmaequi", 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 ba41ed1941ac..094fdf26d8a8 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,29 +17,28 @@ public final class WebhookPropertiesCreateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPropertiesCreateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"ubyyntw\",\"customHeaders\":{\"otgqrlltmu\":\"qtkoievs\",\"zmuvpbttdumorppx\":\"lauwzizxbmpgcjef\",\"fgohdneuelfphs\":\"bmnzbtbhjpgl\",\"v\":\"yhtozfikdowwqu\"},\"status\":\"enabled\",\"scope\":\"lvithhqzonosgg\",\"actions\":[\"chart_push\",\"delete\",\"quarantine\"]}") + "{\"serviceUri\":\"dlfoakggkfp\",\"customHeaders\":{\"lyls\":\"owpulpq\"},\"status\":\"enabled\",\"scope\":\"jnsjervtiagxsd\",\"actions\":[\"quarantine\",\"delete\",\"delete\"]}") .toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("ubyyntw", model.serviceUri()); - Assertions.assertEquals("qtkoievs", model.customHeaders().get("otgqrlltmu")); + Assertions.assertEquals("dlfoakggkfp", model.serviceUri()); + Assertions.assertEquals("owpulpq", model.customHeaders().get("lyls")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("lvithhqzonosgg", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("jnsjervtiagxsd", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("ubyyntw") - .withCustomHeaders(mapOf("otgqrlltmu", "qtkoievs", "zmuvpbttdumorppx", "lauwzizxbmpgcjef", "fgohdneuelfphs", - "bmnzbtbhjpgl", "v", "yhtozfikdowwqu")) + WebhookPropertiesCreateParameters model = new WebhookPropertiesCreateParameters().withServiceUri("dlfoakggkfp") + .withCustomHeaders(mapOf("lyls", "owpulpq")) .withStatus(WebhookStatus.ENABLED) - .withScope("lvithhqzonosgg") - .withActions(Arrays.asList(WebhookAction.CHART_PUSH, WebhookAction.DELETE, WebhookAction.QUARANTINE)); + .withScope("jnsjervtiagxsd") + .withActions(Arrays.asList(WebhookAction.QUARANTINE, WebhookAction.DELETE, WebhookAction.DELETE)); model = BinaryData.fromObject(model).toObject(WebhookPropertiesCreateParameters.class); - Assertions.assertEquals("ubyyntw", model.serviceUri()); - Assertions.assertEquals("qtkoievs", model.customHeaders().get("otgqrlltmu")); + Assertions.assertEquals("dlfoakggkfp", model.serviceUri()); + Assertions.assertEquals("owpulpq", model.customHeaders().get("lyls")); Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); - Assertions.assertEquals("lvithhqzonosgg", model.scope()); - Assertions.assertEquals(WebhookAction.CHART_PUSH, model.actions().get(0)); + Assertions.assertEquals("jnsjervtiagxsd", model.scope()); + Assertions.assertEquals(WebhookAction.QUARANTINE, 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/WebhookPropertiesTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookPropertiesTests.java index 4b684dccd70c..a000c5aa16a4 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,21 +15,22 @@ public final class WebhookPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookProperties model = BinaryData.fromString( - "{\"status\":\"disabled\",\"scope\":\"abnetshh\",\"actions\":[\"delete\",\"chart_push\",\"chart_push\"],\"provisioningState\":\"Updating\"}") + "{\"status\":\"enabled\",\"scope\":\"vaytdwkqbrq\",\"actions\":[\"delete\",\"push\",\"chart_push\",\"chart_delete\"],\"provisioningState\":\"Creating\"}") .toObject(WebhookProperties.class); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("abnetshh", model.scope()); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("vaytdwkqbrq", 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("abnetshh") - .withActions(Arrays.asList(WebhookAction.DELETE, WebhookAction.CHART_PUSH, WebhookAction.CHART_PUSH)); + WebhookProperties model = new WebhookProperties().withStatus(WebhookStatus.ENABLED) + .withScope("vaytdwkqbrq") + .withActions(Arrays.asList(WebhookAction.DELETE, WebhookAction.PUSH, WebhookAction.CHART_PUSH, + WebhookAction.CHART_DELETE)); model = BinaryData.fromObject(model).toObject(WebhookProperties.class); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("abnetshh", model.scope()); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("vaytdwkqbrq", 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 index bf4e606bc4e8..0b2212593915 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,28 @@ public final class WebhookPropertiesUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPropertiesUpdateParameters model = BinaryData.fromString( - "{\"serviceUri\":\"mgxcxrslpm\",\"customHeaders\":{\"uicpd\":\"uoegrpkhjwniyqs\",\"zl\":\"gk\"},\"status\":\"disabled\",\"scope\":\"paxmodfvuefywsb\",\"actions\":[\"quarantine\"]}") + "{\"serviceUri\":\"ppriol\",\"customHeaders\":{\"sobqw\":\"jaltolmnc\",\"vglsbjjca\":\"sdbnwdcfhucqdpf\",\"t\":\"vxb\"},\"status\":\"enabled\",\"scope\":\"tncormrlxqtvco\",\"actions\":[\"delete\",\"chart_delete\"]}") .toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("mgxcxrslpm", model.serviceUri()); - Assertions.assertEquals("uoegrpkhjwniyqs", model.customHeaders().get("uicpd")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("paxmodfvuefywsb", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + Assertions.assertEquals("ppriol", model.serviceUri()); + Assertions.assertEquals("jaltolmnc", model.customHeaders().get("sobqw")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("tncormrlxqtvco", model.scope()); + Assertions.assertEquals(WebhookAction.DELETE, model.actions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("mgxcxrslpm") - .withCustomHeaders(mapOf("uicpd", "uoegrpkhjwniyqs", "zl", "gk")) - .withStatus(WebhookStatus.DISABLED) - .withScope("paxmodfvuefywsb") - .withActions(Arrays.asList(WebhookAction.QUARANTINE)); + WebhookPropertiesUpdateParameters model = new WebhookPropertiesUpdateParameters().withServiceUri("ppriol") + .withCustomHeaders(mapOf("sobqw", "jaltolmnc", "vglsbjjca", "sdbnwdcfhucqdpf", "t", "vxb")) + .withStatus(WebhookStatus.ENABLED) + .withScope("tncormrlxqtvco") + .withActions(Arrays.asList(WebhookAction.DELETE, WebhookAction.CHART_DELETE)); model = BinaryData.fromObject(model).toObject(WebhookPropertiesUpdateParameters.class); - Assertions.assertEquals("mgxcxrslpm", model.serviceUri()); - Assertions.assertEquals("uoegrpkhjwniyqs", model.customHeaders().get("uicpd")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("paxmodfvuefywsb", model.scope()); - Assertions.assertEquals(WebhookAction.QUARANTINE, model.actions().get(0)); + Assertions.assertEquals("ppriol", model.serviceUri()); + Assertions.assertEquals("jaltolmnc", model.customHeaders().get("sobqw")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("tncormrlxqtvco", 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/WebhookUpdateParametersTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/generated/WebhookUpdateParametersTests.java index d48b02b9ef59..bcaf662647ae 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,32 +17,32 @@ public final class WebhookUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"jutiiswacff\":\"dsjnka\",\"pnppfuf\":\"dkzzewkfvhqcrail\",\"afcnih\":\"rwdmhdlxyjrxsa\"},\"properties\":{\"serviceUri\":\"apnedgfbcvkc\",\"customHeaders\":{\"sotbob\":\"pkeqdcvdrhvoo\"},\"status\":\"disabled\",\"scope\":\"cjwvn\",\"actions\":[\"push\"]}}") + "{\"tags\":{\"icvi\":\"bzkfzbeyvpn\",\"jjxd\":\"v\"},\"properties\":{\"serviceUri\":\"uukzclewyhmlw\",\"customHeaders\":{\"hxx\":\"tzpofncckwyfzq\"},\"status\":\"enabled\",\"scope\":\"a\",\"actions\":[\"chart_delete\",\"delete\",\"chart_delete\"]}}") .toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("dsjnka", model.tags().get("jutiiswacff")); - Assertions.assertEquals("apnedgfbcvkc", model.serviceUri()); - Assertions.assertEquals("pkeqdcvdrhvoo", model.customHeaders().get("sotbob")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("cjwvn", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("bzkfzbeyvpn", model.tags().get("icvi")); + Assertions.assertEquals("uukzclewyhmlw", model.serviceUri()); + Assertions.assertEquals("tzpofncckwyfzq", model.customHeaders().get("hxx")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("a", 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("jutiiswacff", "dsjnka", "pnppfuf", "dkzzewkfvhqcrail", "afcnih", "rwdmhdlxyjrxsa")) - .withServiceUri("apnedgfbcvkc") - .withCustomHeaders(mapOf("sotbob", "pkeqdcvdrhvoo")) - .withStatus(WebhookStatus.DISABLED) - .withScope("cjwvn") - .withActions(Arrays.asList(WebhookAction.PUSH)); + .withTags(mapOf("icvi", "bzkfzbeyvpn", "jjxd", "v")) + .withServiceUri("uukzclewyhmlw") + .withCustomHeaders(mapOf("hxx", "tzpofncckwyfzq")) + .withStatus(WebhookStatus.ENABLED) + .withScope("a") + .withActions(Arrays.asList(WebhookAction.CHART_DELETE, WebhookAction.DELETE, WebhookAction.CHART_DELETE)); model = BinaryData.fromObject(model).toObject(WebhookUpdateParameters.class); - Assertions.assertEquals("dsjnka", model.tags().get("jutiiswacff")); - Assertions.assertEquals("apnedgfbcvkc", model.serviceUri()); - Assertions.assertEquals("pkeqdcvdrhvoo", model.customHeaders().get("sotbob")); - Assertions.assertEquals(WebhookStatus.DISABLED, model.status()); - Assertions.assertEquals("cjwvn", model.scope()); - Assertions.assertEquals(WebhookAction.PUSH, model.actions().get(0)); + Assertions.assertEquals("bzkfzbeyvpn", model.tags().get("icvi")); + Assertions.assertEquals("uukzclewyhmlw", model.serviceUri()); + Assertions.assertEquals("tzpofncckwyfzq", model.customHeaders().get("hxx")); + Assertions.assertEquals(WebhookStatus.ENABLED, model.status()); + Assertions.assertEquals("a", 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 f9da72965ed3..5549e99e8fba 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: 6d00d74a16a7305aa9064fc5a534167cc2fbe0a2 +commit: 8b8076693baafd8d4ebeaca903bdaa0c191766b9 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsCreateSamples.java new file mode 100644 index 000000000000..f67c8d356432 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsCreateSamples.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; + +/** + * Samples for ArchiveVersions Create. + */ +public final class ArchiveVersionsCreateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveVersionCreate.json + */ + /** + * Sample code: ArchiveVersionCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveVersionCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchiveVersions() + .create("myResourceGroup", "myRegistry", "rpm", "myArchiveName", "myArchiveVersionName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsDeleteSamples.java new file mode 100644 index 000000000000..b54b6eea4a75 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsDeleteSamples.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; + +/** + * Samples for ArchiveVersions Delete. + */ +public final class ArchiveVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveVersionDelete.json + */ + /** + * Sample code: ArchiveVersionDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveVersionDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchiveVersions() + .delete("myResourceGroup", "myRegistry", "myPackageType", "myArchiveName", "myArchiveVersionName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsGetSamples.java new file mode 100644 index 000000000000..ac6444cc7310 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsGetSamples.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; + +/** + * Samples for ArchiveVersions Get. + */ +public final class ArchiveVersionsGetSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveVersionGet.json + */ + /** + * Sample code: ArchiveVersionGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveVersionGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchiveVersions() + .getWithResponse("myResourceGroup", "myRegistry", "rpm", "myArchiveName", "myArchiveVersionName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsListSamples.java new file mode 100644 index 000000000000..5fdd4648772b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchiveVersionsListSamples.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; + +/** + * Samples for ArchiveVersions List. + */ +public final class ArchiveVersionsListSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveVersionList.json + */ + /** + * Sample code: ArchiveVersionList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveVersionList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchiveVersions() + .list("myResourceGroup", "myRegistry", "myPackageType", "myArchiveName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesCreateSamples.java new file mode 100644 index 000000000000..e99efe1d9056 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesCreateSamples.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.resourcemanager.containerregistry.fluent.models.ArchiveInner; +import com.azure.resourcemanager.containerregistry.models.ArchivePackageSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PackageSourceType; + +/** + * Samples for Archives Create. + */ +public final class ArchivesCreateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveCreate.json + */ + /** + * Sample code: ArchiveCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchives() + .create("myResourceGroup", "myRegistry", "rpm", "myArchiveName", + new ArchiveInner() + .withPackageSource( + new ArchivePackageSourceProperties().withType(PackageSourceType.REMOTE).withUrl("string")) + .withPublishedVersion("string") + .withRepositoryEndpointPrefix("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesDeleteSamples.java new file mode 100644 index 000000000000..e1f4a692df75 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesDeleteSamples.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; + +/** + * Samples for Archives Delete. + */ +public final class ArchivesDeleteSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveDelete.json + */ + /** + * Sample code: ArchiveDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchives() + .delete("myResourceGroup", "myRegistry", "myPackageType", "myArchiveName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesGetSamples.java new file mode 100644 index 000000000000..b349ff952eca --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesGetSamples.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; + +/** + * Samples for Archives Get. + */ +public final class ArchivesGetSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveGet.json + */ + /** + * Sample code: ArchiveGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchives() + .getWithResponse("myResourceGroup", "myRegistry", "myPackageType", "myArchiveName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesListSamples.java new file mode 100644 index 000000000000..9e71e9cecd5a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesListSamples.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; + +/** + * Samples for Archives List. + */ +public final class ArchivesListSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveList.json + */ + /** + * Sample code: ArchiveList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchives() + .list("myResourceGroup", "myRegistry", "myPackageType", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesUpdateSamples.java new file mode 100644 index 000000000000..95e3af6d89e7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ArchivesUpdateSamples.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.resourcemanager.containerregistry.models.ArchiveUpdateParameters; + +/** + * Samples for Archives Update. + */ +public final class ArchivesUpdateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ArchiveUpdate.json + */ + /** + * Sample code: ArchiveUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void archiveUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getArchives() + .updateWithResponse("myResourceGroup", "myRegistry", "myPackageType", "myArchiveName", + new ArchiveUpdateParameters().withPublishedVersion("string"), com.azure.core.util.Context.NONE); + } +} 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 5a137044b8cc..07aa7fce298b 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 @@ -5,13 +5,18 @@ package com.azure.resourcemanager.containerregistry.generated; import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; +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; /** * Samples for CacheRules Create. */ public final class CacheRulesCreateSamples { /* - * x-ms-original-file: 2025-11-01/CacheRuleCreate.json + * x-ms-original-file: 2026-01-01-preview/CacheRuleCreate.json */ /** * Sample code: CacheRuleCreate. @@ -29,4 +34,39 @@ public static void cacheRuleCreate(com.azure.resourcemanager.AzureResourceManage .withTargetRepository("cached-docker-hub/hello-world"), com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-01-01-preview/CacheRuleCreateUserAssignedMIAuthentication.json + */ + /** + * Sample code: CacheRuleCreateUserAssignedMIAuthentication. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + cacheRuleCreateUserAssignedMIAuthentication(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .create("myResourceGroup", "myRegistry", "myCacheRule", new CacheRuleInner() + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity", + new UserIdentityProperties()))) + .withSourceRepository("acr-registry.azurecr.io/library/repository") + .withTargetRepository("cached-acr/hello-world"), com.azure.core.util.Context.NONE); + } + + // 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/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 24fff4434181..93710bc5e771 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 @@ -9,7 +9,7 @@ */ public final class CacheRulesDeleteSamples { /* - * x-ms-original-file: 2025-11-01/CacheRuleDelete.json + * x-ms-original-file: 2026-01-01-preview/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 3d174bd0f72e..8c2215848859 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 @@ -9,7 +9,7 @@ */ public final class CacheRulesGetSamples { /* - * x-ms-original-file: 2025-11-01/CacheRuleGet.json + * x-ms-original-file: 2026-01-01-preview/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 d10b2b5e7729..7b8008a34c2e 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 @@ -9,7 +9,7 @@ */ public final class CacheRulesListSamples { /* - * x-ms-original-file: 2025-11-01/CacheRuleList.json + * x-ms-original-file: 2026-01-01-preview/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 da60cf5bd6d3..380332e09c40 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 @@ -11,7 +11,7 @@ */ public final class CacheRulesUpdateSamples { /* - * x-ms-original-file: 2025-11-01/CacheRuleUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 82b6da8e20c7..ad8538e98feb 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 @@ -17,7 +17,7 @@ */ public final class ConnectedRegistriesCreateSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryCreate.json + * x-ms-original-file: 2026-01-01-preview/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 415e5280ec21..6f4b6b572df9 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 @@ -9,7 +9,7 @@ */ public final class ConnectedRegistriesDeactivateSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDeactivate.json + * x-ms-original-file: 2026-01-01-preview/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 8d432bb53320..d00d6072ebd1 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 @@ -9,7 +9,7 @@ */ public final class ConnectedRegistriesDeleteSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryDelete.json + * x-ms-original-file: 2026-01-01-preview/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 429958408059..9369bfb65727 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 @@ -9,7 +9,7 @@ */ public final class ConnectedRegistriesGetSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryGet.json + * x-ms-original-file: 2026-01-01-preview/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 6d9fef77fbed..386faf59229f 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 @@ -9,7 +9,7 @@ */ public final class ConnectedRegistriesListSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryList.json + * x-ms-original-file: 2026-01-01-preview/ConnectedRegistryList.json */ /** * Sample code: ConnectedRegistryList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesResyncSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesResyncSamples.java new file mode 100644 index 000000000000..fb624b788dd6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ConnectedRegistriesResyncSamples.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; + +/** + * Samples for ConnectedRegistries Resync. + */ +public final class ConnectedRegistriesResyncSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ConnectedRegistryResync.json + */ + /** + * Sample code: ConnectedRegistryResync. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void connectedRegistryResync(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getConnectedRegistries() + .resyncWithResponse("myResourceGroup", "myRegistry", "myConnectedRegistry", + com.azure.core.util.Context.NONE); + } +} 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 0f27dcf0f08d..572bf466c7eb 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 @@ -18,7 +18,7 @@ */ public final class ConnectedRegistriesUpdateSamples { /* - * x-ms-original-file: 2025-11-01/ConnectedRegistryUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 de0931e7a86f..7c3ff0691773 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 @@ -16,7 +16,7 @@ */ public final class CredentialSetsCreateSamples { /* - * x-ms-original-file: 2025-11-01/CredentialSetCreate.json + * x-ms-original-file: 2026-01-01-preview/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 0915e4433489..1da8278f6441 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 @@ -9,7 +9,7 @@ */ public final class CredentialSetsDeleteSamples { /* - * x-ms-original-file: 2025-11-01/CredentialSetDelete.json + * x-ms-original-file: 2026-01-01-preview/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 053d34c8bf5d..01a1366ee896 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 @@ -9,7 +9,7 @@ */ public final class CredentialSetsGetSamples { /* - * x-ms-original-file: 2025-11-01/CredentialSetGet.json + * x-ms-original-file: 2026-01-01-preview/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 2603e0dea8d7..8b3ad0c2bf2c 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 @@ -9,7 +9,7 @@ */ public final class CredentialSetsListSamples { /* - * x-ms-original-file: 2025-11-01/CredentialSetList.json + * x-ms-original-file: 2026-01-01-preview/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 0d107742f249..40c63f5ae951 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 @@ -14,7 +14,7 @@ */ public final class CredentialSetsUpdateSamples { /* - * x-ms-original-file: 2025-11-01/CredentialSetUpdate.json + * x-ms-original-file: 2026-01-01-preview/CredentialSetUpdate.json */ /** * Sample code: CredentialSetUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesCreateSamples.java new file mode 100644 index 000000000000..397d8d8c342c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesCreateSamples.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; + +import com.azure.resourcemanager.containerregistry.fluent.models.ExportPipelineInner; +import com.azure.resourcemanager.containerregistry.models.ExportPipelineTargetProperties; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.ResourceIdentityType; +import com.azure.resourcemanager.containerregistry.models.StorageAccessMode; +import java.util.Arrays; + +/** + * Samples for ExportPipelines Create. + */ +public final class ExportPipelinesCreateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ExportPipelineCreate.json + */ + /** + * Sample code: ExportPipelineCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void exportPipelineCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getExportPipelines() + .create("myResourceGroup", "myRegistry", "myExportPipeline", + new ExportPipelineInner().withLocation("westus") + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withTarget(new ExportPipelineTargetProperties().withType("AzureStorageBlobContainer") + .withUri("https://accountname.blob.core.windows.net/containername") + .withKeyVaultUri("fakeTokenPlaceholder") + .withStorageAccessMode(StorageAccessMode.SAS_TOKEN)) + .withOptions(Arrays.asList(PipelineOptions.OVERWRITE_BLOBS)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesDeleteSamples.java new file mode 100644 index 000000000000..22b50a922106 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesDeleteSamples.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; + +/** + * Samples for ExportPipelines Delete. + */ +public final class ExportPipelinesDeleteSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ExportPipelineDelete.json + */ + /** + * Sample code: ExportPipelineDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void exportPipelineDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getExportPipelines() + .delete("myResourceGroup", "myRegistry", "myExportPipeline", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesGetSamples.java new file mode 100644 index 000000000000..30dc989373ec --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesGetSamples.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; + +/** + * Samples for ExportPipelines Get. + */ +public final class ExportPipelinesGetSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ExportPipelineGet.json + */ + /** + * Sample code: ExportPipelineGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void exportPipelineGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getExportPipelines() + .getWithResponse("myResourceGroup", "myRegistry", "myExportPipeline", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesListSamples.java new file mode 100644 index 000000000000..b376fef6dbd1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ExportPipelinesListSamples.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; + +/** + * Samples for ExportPipelines List. + */ +public final class ExportPipelinesListSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ExportPipelineList.json + */ + /** + * Sample code: ExportPipelineList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void exportPipelineList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getExportPipelines() + .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesCreateSamples.java new file mode 100644 index 000000000000..cff7fc699c69 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesCreateSamples.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.resourcemanager.containerregistry.fluent.models.ImportPipelineInner; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.ImportPipelineSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineOptions; +import com.azure.resourcemanager.containerregistry.models.PipelineSourceType; +import com.azure.resourcemanager.containerregistry.models.ResourceIdentityType; +import com.azure.resourcemanager.containerregistry.models.StorageAccessMode; +import com.azure.resourcemanager.containerregistry.models.UserIdentityProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ImportPipelines Create. + */ +public final class ImportPipelinesCreateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ImportPipelineCreate.json + */ + /** + * Sample code: ImportPipelineCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void importPipelineCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getImportPipelines() + .create("myResourceGroup", "myRegistry", "myImportPipeline", new ImportPipelineInner() + .withLocation("westus") + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2", + new UserIdentityProperties()))) + .withSource( + new ImportPipelineSourceProperties().withType(PipelineSourceType.AZURE_STORAGE_BLOB_CONTAINER) + .withUri("https://accountname.blob.core.windows.net/containername") + .withKeyVaultUri("fakeTokenPlaceholder") + .withStorageAccessMode(StorageAccessMode.SAS_TOKEN)) + .withOptions(Arrays.asList(PipelineOptions.OVERWRITE_TAGS, + PipelineOptions.DELETE_SOURCE_BLOB_ON_SUCCESS, PipelineOptions.CONTINUE_ON_ERRORS)), + com.azure.core.util.Context.NONE); + } + + // 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/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesDeleteSamples.java new file mode 100644 index 000000000000..2c9fe68d5282 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesDeleteSamples.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; + +/** + * Samples for ImportPipelines Delete. + */ +public final class ImportPipelinesDeleteSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ImportPipelineDelete.json + */ + /** + * Sample code: ImportPipelineDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void importPipelineDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getImportPipelines() + .delete("myResourceGroup", "myRegistry", "myImportPipeline", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesGetSamples.java new file mode 100644 index 000000000000..bb1666ca17fd --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesGetSamples.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; + +/** + * Samples for ImportPipelines Get. + */ +public final class ImportPipelinesGetSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ImportPipelineGet.json + */ + /** + * Sample code: ImportPipelineGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void importPipelineGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getImportPipelines() + .getWithResponse("myResourceGroup", "myRegistry", "myImportPipeline", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesListSamples.java new file mode 100644 index 000000000000..949d99337fd4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ImportPipelinesListSamples.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; + +/** + * Samples for ImportPipelines List. + */ +public final class ImportPipelinesListSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ImportPipelineList.json + */ + /** + * Sample code: ImportPipelineList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void importPipelineList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getImportPipelines() + .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} 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 d92cfdfed79e..fbdcf477c84a 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 @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-11-01/OperationList.json + * x-ms-original-file: 2026-01-01-preview/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsCreateSamples.java new file mode 100644 index 000000000000..95dbab08cd14 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsCreateSamples.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.resourcemanager.containerregistry.fluent.models.PipelineRunInner; +import com.azure.resourcemanager.containerregistry.models.PipelineRunRequest; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunSourceType; +import com.azure.resourcemanager.containerregistry.models.PipelineRunTargetProperties; +import com.azure.resourcemanager.containerregistry.models.PipelineRunTargetType; +import java.util.Arrays; + +/** + * Samples for PipelineRuns Create. + */ +public final class PipelineRunsCreateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/PipelineRunCreate_Import.json + */ + /** + * Sample code: PipelineRunCreate_Import. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void pipelineRunCreateImport(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getPipelineRuns() + .create("myResourceGroup", "myRegistry", "myPipelineRun", + new PipelineRunInner().withRequest(new PipelineRunRequest().withPipelineResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline") + .withSource(new PipelineRunSourceProperties().withType(PipelineRunSourceType.AZURE_STORAGE_BLOB) + .withName("myblob.tar.gz")) + .withCatalogDigest("sha256@")).withForceUpdateTag("2020-03-04T17:23:21.9261521+00:00"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01-preview/PipelineRunCreate_Export.json + */ + /** + * Sample code: PipelineRunCreate_Export. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void pipelineRunCreateExport(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getPipelineRuns() + .create("myResourceGroup", "myRegistry", "myPipelineRun", + new PipelineRunInner().withRequest(new PipelineRunRequest().withPipelineResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline") + .withArtifacts(Arrays.asList("sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000")) + .withTarget(new PipelineRunTargetProperties().withType(PipelineRunTargetType.AZURE_STORAGE_BLOB) + .withName("myblob.tar.gz"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsDeleteSamples.java new file mode 100644 index 000000000000..4a72a56d255b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsDeleteSamples.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; + +/** + * Samples for PipelineRuns Delete. + */ +public final class PipelineRunsDeleteSamples { + /* + * x-ms-original-file: 2026-01-01-preview/PipelineRunDelete.json + */ + /** + * Sample code: PipelineRunDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void pipelineRunDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getPipelineRuns() + .delete("myResourceGroup", "myRegistry", "myPipelineRun", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsGetSamples.java new file mode 100644 index 000000000000..1c67f7d678d1 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsGetSamples.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; + +/** + * Samples for PipelineRuns Get. + */ +public final class PipelineRunsGetSamples { + /* + * x-ms-original-file: 2026-01-01-preview/PipelineRunGet.json + */ + /** + * Sample code: PipelineRunGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void pipelineRunGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getPipelineRuns() + .getWithResponse("myResourceGroup", "myRegistry", "myPipelineRun", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsListSamples.java new file mode 100644 index 000000000000..da9080e9fb0c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PipelineRunsListSamples.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; + +/** + * Samples for PipelineRuns List. + */ +public final class PipelineRunsListSamples { + /* + * x-ms-original-file: 2026-01-01-preview/PipelineRunList.json + */ + /** + * Sample code: PipelineRunList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void pipelineRunList(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getPipelineRuns() + .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} 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 8030885875f2..a2b6e26c6b64 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 @@ -13,7 +13,7 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 247498a86c16..e48f1d31a239 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 @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionDelete.json + * x-ms-original-file: 2026-01-01-preview/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 ddb83529f7b6..5209ea9bf391 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 @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionGet.json + * x-ms-original-file: 2026-01-01-preview/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 2be694130883..6d20d14909f3 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 @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2025-11-01/PrivateEndpointConnectionList.json + * x-ms-original-file: 2026-01-01-preview/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 134d9d56b13b..78d66e104b18 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,6 +4,7 @@ package com.azure.resourcemanager.containerregistry.generated; +import com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; /** @@ -11,7 +12,7 @@ */ public final class RegistriesCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameAvailable.json + * x-ms-original-file: 2026-01-01-preview/RegistryCheckNameAvailable.json */ /** * Sample code: RegistryCheckNameAvailable. @@ -23,12 +24,15 @@ public static void registryCheckNameAvailable(com.azure.resourcemanager.AzureRes .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withResourceGroupName("myResourceGroup") + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.RESOURCE_GROUP_REUSE), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-11-01/RegistryCheckNameNotAvailable.json + * x-ms-original-file: 2026-01-01-preview/RegistryCheckNameNotAvailable.json */ /** * Sample code: RegistryCheckNameNotAvailable. @@ -40,7 +44,10 @@ public static void registryCheckNameNotAvailable(com.azure.resourcemanager.Azure .manager() .serviceClient() .getRegistries() - .checkNameAvailabilityWithResponse(new RegistryNameCheckRequest().withName("myRegistry"), + .checkNameAvailabilityWithResponse( + new RegistryNameCheckRequest().withName("myRegistry") + .withResourceGroupName("myResourceGroup") + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.RESOURCE_GROUP_REUSE), 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 5e21cff6d206..cc8d2ea432e1 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.containerregistry.generated; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryInner; +import com.azure.resourcemanager.containerregistry.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.containerregistry.models.RoleAssignmentMode; import com.azure.resourcemanager.containerregistry.models.Sku; import com.azure.resourcemanager.containerregistry.models.SkuName; @@ -17,7 +18,7 @@ */ public final class RegistriesCreateSamples { /* - * x-ms-original-file: 2025-11-01/RegistryCreateAbac.json + * x-ms-original-file: 2026-01-01-preview/RegistryCreateAbac.json */ /** * Sample code: RegistryCreateAbac. @@ -38,7 +39,28 @@ public static void registryCreateAbac(com.azure.resourcemanager.AzureResourceMan } /* - * x-ms-original-file: 2025-11-01/RegistryCreateZoneRedundant.json + * x-ms-original-file: 2026-01-01-preview/RegistryCreateDomainNameLabelScope.json + */ + /** + * Sample code: RegistryCreateDomainNameLabelScope. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void registryCreateDomainNameLabelScope(com.azure.resourcemanager.AzureResourceManager azure) { + azure.containerRegistries() + .manager() + .serviceClient() + .getRegistries() + .create("myResourceGroup", "myRegistry", + new RegistryInner().withLocation("westus") + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withSku(new Sku().withName(SkuName.STANDARD)) + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.TENANT_REUSE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01-preview/RegistryCreateZoneRedundant.json */ /** * Sample code: RegistryCreateZoneRedundant. @@ -59,7 +81,7 @@ public static void registryCreateZoneRedundant(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: 2025-11-01/RegistryCreate.json + * x-ms-original-file: 2026-01-01-preview/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 7d4a24062077..18b5e30e3098 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 @@ -9,7 +9,7 @@ */ public final class RegistriesDeleteSamples { /* - * x-ms-original-file: 2025-11-01/RegistryDelete.json + * x-ms-original-file: 2026-01-01-preview/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 4abda7cd4579..5128e8816181 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 @@ -12,7 +12,7 @@ */ public final class RegistriesGenerateCredentialsSamples { /* - * x-ms-original-file: 2025-11-01/RegistryGenerateCredentials.json + * x-ms-original-file: 2026-01-01-preview/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 8997feddfad4..b2aef126ab89 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 @@ -9,7 +9,7 @@ */ public final class RegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-11-01/RegistryGet.json + * x-ms-original-file: 2026-01-01-preview/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 7e3930cf9970..fc238be343ab 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 @@ -9,7 +9,7 @@ */ public final class RegistriesGetPrivateLinkResourceSamples { /* - * x-ms-original-file: 2025-11-01/RegistryGetPrivateLinkResource.json + * x-ms-original-file: 2026-01-01-preview/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 ffbda54e0373..d08e6efe29ef 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 @@ -14,7 +14,7 @@ */ public final class RegistriesImportImageSamples { /* - * x-ms-original-file: 2025-11-01/ImportImageFromPublicRegistry.json + * x-ms-original-file: 2026-01-01-preview/ImportImageFromPublicRegistry.json */ /** * Sample code: ImportImageFromPublicRegistry. @@ -37,7 +37,7 @@ public static void importImageFromPublicRegistry(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: 2025-11-01/ImportImageByTag.json + * x-ms-original-file: 2026-01-01-preview/ImportImageByTag.json */ /** * Sample code: ImportImageByTag. @@ -60,7 +60,7 @@ public static void importImageByTag(com.azure.resourcemanager.AzureResourceManag } /* - * x-ms-original-file: 2025-11-01/ImportImageByManifestDigest.json + * x-ms-original-file: 2026-01-01-preview/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 99fa534fd9a9..9389a363dd84 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 @@ -9,7 +9,7 @@ */ public final class RegistriesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-11-01/RegistryListByResourceGroup.json + * x-ms-original-file: 2026-01-01-preview/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 dc9dd530a4c9..31d64d92f9fa 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 @@ -9,7 +9,7 @@ */ public final class RegistriesListCredentialsSamples { /* - * x-ms-original-file: 2025-11-01/RegistryListCredentials.json + * x-ms-original-file: 2026-01-01-preview/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 767b14d7ed5f..0a5249322131 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 @@ -9,7 +9,7 @@ */ public final class RegistriesListPrivateLinkResourcesSamples { /* - * x-ms-original-file: 2025-11-01/RegistryListPrivateLinkResources.json + * x-ms-original-file: 2026-01-01-preview/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 37641c4994db..19ca181ccaa8 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 @@ -9,7 +9,7 @@ */ public final class RegistriesListSamples { /* - * x-ms-original-file: 2025-11-01/RegistryList.json + * x-ms-original-file: 2026-01-01-preview/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 4f4bc3477558..01b49f9c696e 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 @@ -9,7 +9,7 @@ */ public final class RegistriesListUsagesSamples { /* - * x-ms-original-file: 2025-11-01/RegistryListUsages.json + * x-ms-original-file: 2026-01-01-preview/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 924c1f669e94..be9e31669a61 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 @@ -12,7 +12,7 @@ */ public final class RegistriesRegenerateCredentialSamples { /* - * x-ms-original-file: 2025-11-01/RegistryRegenerateCredential.json + * x-ms-original-file: 2026-01-01-preview/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 3f229bfc2096..2e8db3633ec5 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 @@ -16,7 +16,7 @@ */ public final class RegistriesUpdateSamples { /* - * x-ms-original-file: 2025-11-01/RegistryUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 36bb9c92d7ba..a559f62afb05 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 @@ -14,7 +14,7 @@ */ public final class ReplicationsCreateSamples { /* - * x-ms-original-file: 2025-11-01/ReplicationCreate.json + * x-ms-original-file: 2026-01-01-preview/ReplicationCreate.json */ /** * Sample code: ReplicationCreate. @@ -32,7 +32,7 @@ public static void replicationCreate(com.azure.resourcemanager.AzureResourceMana } /* - * x-ms-original-file: 2025-11-01/ReplicationCreateZoneRedundant.json + * x-ms-original-file: 2026-01-01-preview/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 78a1dba4046d..ce738365b42d 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 @@ -9,7 +9,7 @@ */ public final class ReplicationsDeleteSamples { /* - * x-ms-original-file: 2025-11-01/ReplicationDelete.json + * x-ms-original-file: 2026-01-01-preview/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 868de61bbcce..1f35b614e06e 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 @@ -9,7 +9,7 @@ */ public final class ReplicationsGetSamples { /* - * x-ms-original-file: 2025-11-01/ReplicationGet.json + * x-ms-original-file: 2026-01-01-preview/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 a2a20e46326a..26b044c297e8 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 @@ -9,7 +9,7 @@ */ public final class ReplicationsListSamples { /* - * x-ms-original-file: 2025-11-01/ReplicationList.json + * x-ms-original-file: 2026-01-01-preview/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 76de4a5e7ea9..27a5218061eb 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 @@ -13,7 +13,7 @@ */ public final class ReplicationsUpdateSamples { /* - * x-ms-original-file: 2025-11-01/ReplicationUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 cf6ab3dac0e1..e652761b6fb7 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 @@ -12,7 +12,7 @@ */ public final class ScopeMapsCreateSamples { /* - * x-ms-original-file: 2025-11-01/ScopeMapCreate.json + * x-ms-original-file: 2026-01-01-preview/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 55c01dd0f8f7..0cf0855e68db 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 @@ -9,7 +9,7 @@ */ public final class ScopeMapsDeleteSamples { /* - * x-ms-original-file: 2025-11-01/ScopeMapDelete.json + * x-ms-original-file: 2026-01-01-preview/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 2f19ff823bc7..6284c628a5ac 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 @@ -9,7 +9,7 @@ */ public final class ScopeMapsGetSamples { /* - * x-ms-original-file: 2025-11-01/ScopeMapGet.json + * x-ms-original-file: 2026-01-01-preview/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 c3d9637afe1c..8f92077351fa 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 @@ -9,7 +9,7 @@ */ public final class ScopeMapsListSamples { /* - * x-ms-original-file: 2025-11-01/ScopeMapList.json + * x-ms-original-file: 2026-01-01-preview/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 2d8c9a2122aa..bdec0f23719a 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 @@ -12,7 +12,7 @@ */ public final class ScopeMapsUpdateSamples { /* - * x-ms-original-file: 2025-11-01/ScopeMapUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 c58639b227f3..25b0aa6139d3 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 @@ -16,7 +16,7 @@ */ public final class TokensCreateSamples { /* - * x-ms-original-file: 2025-11-01/TokenCreate.json + * x-ms-original-file: 2026-01-01-preview/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 01d6ffa62b33..4db74be087f6 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 @@ -9,7 +9,7 @@ */ public final class TokensDeleteSamples { /* - * x-ms-original-file: 2025-11-01/TokenDelete.json + * x-ms-original-file: 2026-01-01-preview/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 b5db17acfce9..b9ea4ab66bcb 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 @@ -9,7 +9,7 @@ */ public final class TokensGetSamples { /* - * x-ms-original-file: 2025-11-01/TokenGet.json + * x-ms-original-file: 2026-01-01-preview/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 839fb2a256ea..42e57ee9558c 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 @@ -9,7 +9,7 @@ */ public final class TokensListSamples { /* - * x-ms-original-file: 2025-11-01/TokenList.json + * x-ms-original-file: 2026-01-01-preview/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 b1cd274d4be0..9c36eb82831a 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 @@ -15,7 +15,7 @@ */ public final class TokensUpdateSamples { /* - * x-ms-original-file: 2025-11-01/TokenUpdate.json + * x-ms-original-file: 2026-01-01-preview/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 3e95b5433e99..23f779f2c74c 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 @@ -16,7 +16,7 @@ */ public final class WebhooksCreateSamples { /* - * x-ms-original-file: 2025-11-01/WebhookCreate.json + * x-ms-original-file: 2026-01-01-preview/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 5e4442c888ad..476616bc6aaa 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 @@ -9,7 +9,7 @@ */ public final class WebhooksDeleteSamples { /* - * x-ms-original-file: 2025-11-01/WebhookDelete.json + * x-ms-original-file: 2026-01-01-preview/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 884a7a9bf9dd..8f50c0b08429 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 @@ -9,7 +9,7 @@ */ public final class WebhooksGetCallbackConfigSamples { /* - * x-ms-original-file: 2025-11-01/WebhookGetCallbackConfig.json + * x-ms-original-file: 2026-01-01-preview/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 899bde57a53d..c73334191e34 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 @@ -9,7 +9,7 @@ */ public final class WebhooksGetSamples { /* - * x-ms-original-file: 2025-11-01/WebhookGet.json + * x-ms-original-file: 2026-01-01-preview/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 3fb135ba14c9..872dbac45c27 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 @@ -9,7 +9,7 @@ */ public final class WebhooksListEventsSamples { /* - * x-ms-original-file: 2025-11-01/WebhookListEvents.json + * x-ms-original-file: 2026-01-01-preview/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 1a5207937648..7306e7863b22 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 @@ -9,7 +9,7 @@ */ public final class WebhooksListSamples { /* - * x-ms-original-file: 2025-11-01/WebhookList.json + * x-ms-original-file: 2026-01-01-preview/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 d73af7bd2dac..1277efa5f807 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 @@ -9,7 +9,7 @@ */ public final class WebhooksPingSamples { /* - * x-ms-original-file: 2025-11-01/WebhookPing.json + * x-ms-original-file: 2026-01-01-preview/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 e0481a9104a8..77307971e122 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 @@ -16,7 +16,7 @@ */ public final class WebhooksUpdateSamples { /* - * x-ms-original-file: 2025-11-01/WebhookUpdate.json + * x-ms-original-file: 2026-01-01-preview/WebhookUpdate.json */ /** * Sample code: WebhookUpdate.